|
10 | 10 | */ |
11 | 11 |
|
12 | 12 | $finder = PhpCsFixer\Finder::create() |
13 | | - ->name('*.php') |
14 | | - ->ignoreDotFiles(TRUE) |
15 | | - ->ignoreVCS(TRUE); |
| 13 | + ->in(__DIR__ . '/packages') |
| 14 | + ->append([__FILE__]) |
| 15 | + ->name('*.php') |
| 16 | + ->ignoreDotFiles(true) |
| 17 | + ->ignoreVCS(true); |
16 | 18 |
|
17 | 19 | $config = new PhpCsFixer\Config(); |
18 | 20 | $config->setFinder($finder) |
19 | | - ->setRules([ |
20 | | - '@PSR12' => TRUE, |
21 | | - 'array_syntax' => ['syntax' => 'short'], |
22 | | - 'ordered_imports' => ['sort_algorithm' => 'alpha'], |
23 | | - 'no_unused_imports' => TRUE, |
24 | | - 'not_operator_with_successor_space' => TRUE, |
25 | | - 'trailing_comma_in_multiline' => TRUE, |
26 | | - 'phpdoc_scalar' => TRUE, |
27 | | - 'unary_operator_spaces' => TRUE, |
28 | | - 'binary_operator_spaces' => TRUE, |
29 | | - 'blank_line_before_statement' => [ |
30 | | - 'statements' => [ |
31 | | - 'break', |
32 | | - 'continue', |
33 | | - 'declare', |
34 | | - 'return', |
35 | | - 'throw', |
36 | | - 'try', |
37 | | - ], |
38 | | - ], |
39 | | - 'phpdoc_single_line_var_spacing' => TRUE, |
40 | | - 'phpdoc_var_without_name' => TRUE, |
41 | | - 'class_attributes_separation' => [ |
42 | | - 'elements' => [ |
43 | | - 'method' => 'one', |
44 | | - ], |
45 | | - ], |
46 | | - 'braces' => [ |
47 | | - 'allow_single_line_closure' => TRUE, |
48 | | - 'position_after_anonymous_constructs' => 'same', |
49 | | - 'position_after_functions_and_oop_constructs' => 'next', |
50 | | - 'position_after_control_structures' => 'same', |
51 | | - ], |
52 | | - 'method_argument_space' => [ |
53 | | - 'on_multiline' => 'ensure_fully_multiline', |
54 | | - 'keep_multiple_spaces_after_comma' => TRUE, |
55 | | - ], |
56 | | - 'single_trait_insert_per_statement' => TRUE, |
57 | | - ]); |
| 21 | + ->setRules( |
| 22 | + [ |
| 23 | + '@PSR12' => true, |
| 24 | + 'array_syntax' => ['syntax' => 'short'], |
| 25 | + 'ordered_imports' => ['sort_algorithm' => 'alpha'], |
| 26 | + 'no_unused_imports' => true, |
| 27 | + 'not_operator_with_successor_space' => true, |
| 28 | + 'trailing_comma_in_multiline' => true, |
| 29 | + 'phpdoc_scalar' => true, |
| 30 | + 'unary_operator_spaces' => true, |
| 31 | + 'binary_operator_spaces' => true, |
| 32 | + 'blank_line_before_statement' => [ |
| 33 | + 'statements' => [ |
| 34 | + 'break', |
| 35 | + 'continue', |
| 36 | + 'declare', |
| 37 | + 'return', |
| 38 | + 'throw', |
| 39 | + 'try', |
| 40 | + ], |
| 41 | + ], |
| 42 | + 'phpdoc_single_line_var_spacing' => true, |
| 43 | + 'phpdoc_var_without_name' => true, |
| 44 | + 'class_attributes_separation' => [ |
| 45 | + 'elements' => [ |
| 46 | + 'method' => 'one', |
| 47 | + ], |
| 48 | + ], |
| 49 | + 'braces' => [ |
| 50 | + 'allow_single_line_closure' => true, |
| 51 | + 'position_after_anonymous_constructs' => 'same', |
| 52 | + 'position_after_functions_and_oop_constructs' => 'next', |
| 53 | + 'position_after_control_structures' => 'same', |
| 54 | + ], |
| 55 | + 'method_argument_space' => [ |
| 56 | + 'on_multiline' => 'ensure_fully_multiline', |
| 57 | + 'keep_multiple_spaces_after_comma' => true, |
| 58 | + ], |
| 59 | + 'single_trait_insert_per_statement' => true, |
| 60 | + ] |
| 61 | + ); |
58 | 62 |
|
59 | 63 | return $config; |
0 commit comments