|
1 | 1 | <?php |
2 | 2 |
|
3 | | -return PhpCsFixer\Config::create() |
4 | | - ->setRiskyAllowed(true) |
5 | | - ->setRules([ |
6 | | - "@PSR1" => true, |
7 | | - "@PSR2" => true, |
8 | | - "braces" => [ |
9 | | - "allow_single_line_closure" => true, |
10 | | - "position_after_functions_and_oop_constructs" => "same", |
11 | | - ], |
12 | | - "array_syntax" => ["syntax" => "short"], |
13 | | - "cast_spaces" => true, |
14 | | - "combine_consecutive_unsets" => true, |
15 | | - "function_to_constant" => true, |
16 | | - "native_function_invocation" => true, |
17 | | - "no_multiline_whitespace_before_semicolons" => true, |
18 | | - "no_unused_imports" => true, |
19 | | - "no_useless_else" => true, |
20 | | - "no_useless_return" => true, |
21 | | - "no_whitespace_before_comma_in_array" => true, |
22 | | - "no_whitespace_in_blank_line" => true, |
23 | | - "non_printable_character" => true, |
24 | | - "normalize_index_brace" => true, |
25 | | - "ordered_imports" => true, |
26 | | - "php_unit_construct" => true, |
27 | | - "php_unit_dedicate_assert" => true, |
28 | | - "php_unit_fqcn_annotation" => true, |
29 | | - "phpdoc_summary" => true, |
30 | | - "phpdoc_types" => true, |
31 | | - "psr4" => true, |
32 | | - "return_type_declaration" => ["space_before" => "none"], |
33 | | - "short_scalar_cast" => true, |
34 | | - "single_blank_line_before_namespace" => true, |
35 | | - ]) |
36 | | - ->setFinder( |
37 | | - PhpCsFixer\Finder::create() |
38 | | - ->in(__DIR__ . "/src") |
39 | | - ->in(__DIR__ . "/test") |
40 | | - ); |
| 3 | +$config = new Amp\CodeStyle\Config; |
| 4 | +$config->getFinder() |
| 5 | + ->in(__DIR__ . '/src') |
| 6 | + ->in(__DIR__ . '/test'); |
| 7 | + |
| 8 | +$config->setCacheFile(__DIR__ . '/.php_cs.cache'); |
| 9 | + |
| 10 | +return $config; |
0 commit comments