|
2 | 2 |
|
3 | 3 | namespace ApiClients\Tools\TestUtilities;
|
4 | 4 |
|
| 5 | +use ApiClients\Tools\CsFixerConfig\PhpCsFixerConfig as CSFC; |
5 | 6 | use PhpCsFixer\Config;
|
6 | 7 |
|
7 | 8 | final class PhpCsFixerConfig
|
8 | 9 | {
|
9 | 10 | /**
|
10 | 11 | * @return Config
|
| 12 | + * @deprecated use ApiClients\Tools\CsFixerConfig\PhpCsFixerConfig directly |
11 | 13 | */
|
12 | 14 | public static function create(array $extraRules = []): Config
|
13 | 15 | {
|
14 |
| - return Config::create() |
15 |
| - ->setRules( |
16 |
| - [ |
17 |
| - '@PSR2' => true, |
18 |
| - 'array_syntax' => [ |
19 |
| - 'syntax' => 'short', |
20 |
| - ], |
21 |
| - 'indentation_type' => true, |
22 |
| - 'blank_line_before_return' => true, |
23 |
| - 'declare_strict_types' => true, |
24 |
| - 'method_separation' => true, |
25 |
| - 'new_with_braces' => true, |
26 |
| - 'no_extra_consecutive_blank_lines' => true, |
27 |
| - 'no_leading_import_slash' => true, |
28 |
| - 'no_short_bool_cast' => true, |
29 |
| - 'no_unused_imports' => true, |
30 |
| - 'no_whitespace_before_comma_in_array' => true, |
31 |
| - 'no_whitespace_in_blank_line' => true, |
32 |
| - 'ordered_class_elements' => true, |
33 |
| - 'ordered_imports' => true, |
34 |
| - 'phpdoc_add_missing_param_annotation' => true, |
35 |
| - 'phpdoc_align' => true, |
36 |
| - 'phpdoc_no_empty_return' => true, |
37 |
| - 'phpdoc_order' => true, |
38 |
| - 'phpdoc_scalar' => true, |
39 |
| - 'phpdoc_summary' => true, |
40 |
| - 'return_type_declaration' => true, |
41 |
| - 'single_blank_line_before_namespace' => true, |
42 |
| - 'single_class_element_per_statement' => true, |
43 |
| - 'single_quote' => true, |
44 |
| - 'strict_param' => true, |
45 |
| - 'trailing_comma_in_multiline_array' => true, |
46 |
| - ] + $extraRules |
47 |
| - ); |
| 16 | + return CSFC::create($extraRules); |
48 | 17 | }
|
49 | 18 | }
|
0 commit comments