-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.php-cs-fixer.dist.php
79 lines (77 loc) · 2.97 KB
/
.php-cs-fixer.dist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator
* you can change this configuration by importing this file.
*/
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'vendor',
'runtime',
])
->notPath([
'dump.php',
'src/exception_file.php',
])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setIndent(' ')
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'@Symfony:risky' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'combine_consecutive_unsets' => true,
// 'method_separation' => true,
'single_quote' => true,
'declare_equal_normalize' => true,
'function_typehint_space' => true,
// 'hash_to_slash_comment' => true,
'include' => true,
'lowercase_cast' => true,
'native_function_invocation' => [],
// 'no_multiline_whitespace_before_semicolons' => true,
'no_leading_import_slash' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
// 'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
// 'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
// 'no_extra_consecutive_blank_lines' => [
// 'curly_brace_block',
// 'extra',
// 'parenthesis_brace_block',
// 'square_brace_block',
// 'throw',
// 'use',
// ],
'binary_operator_spaces' => [
'default' => 'align_single_space_minimal',
'operators' => [
'=>' => 'align_single_space_minimal',
'=' => 'align_single_space',
'|' => 'no_space',
'===' => 'align_single_space_minimal',
],
],
'braces' => [
'allow_single_line_closure' => true,
],
])
->setFinder($finder)
;