|
2 | 2 |
|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
5 | | -use PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer; |
6 | | -use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer; |
7 | | -use PhpCsFixer\Fixer\ClassNotation\OrderedTraitsFixer; |
8 | | -use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer; |
9 | | -use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer; |
10 | | -use PhpCsFixer\Fixer\Import\OrderedImportsFixer; |
11 | | -use PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer; |
12 | | -use Symplify\EasyCodingStandard\Config\ECSConfig; |
13 | | - |
14 | | -return ECSConfig::configure() |
| 5 | +return \Symplify\EasyCodingStandard\Config\ECSConfig::configure() |
15 | 6 | ->withConfiguredRule( |
16 | | - ClassDefinitionFixer::class, |
| 7 | + \PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, |
17 | 8 | [ |
18 | 9 | 'space_before_parenthesis' => true, |
19 | 10 | ], |
20 | 11 | ) |
21 | 12 | ->withConfiguredRule( |
22 | | - OrderedImportsFixer::class, |
| 13 | + \PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer::class, |
| 14 | + [ |
| 15 | + 'order' => [ |
| 16 | + 'use_trait', |
| 17 | + 'constant_public', |
| 18 | + 'constant_protected', |
| 19 | + 'constant_private', |
| 20 | + 'case', |
| 21 | + 'property_public', |
| 22 | + 'property_protected', |
| 23 | + 'property_private', |
| 24 | + 'construct', |
| 25 | + 'destruct', |
| 26 | + 'magic', |
| 27 | + 'phpunit', |
| 28 | + 'method_public', |
| 29 | + 'method_protected', |
| 30 | + 'method_private', |
| 31 | + ], |
| 32 | + 'sort_algorithm' => 'alpha', |
| 33 | + ], |
| 34 | + ) |
| 35 | + ->withConfiguredRule( |
| 36 | + \PhpCsFixer\Fixer\Import\OrderedImportsFixer::class, |
23 | 37 | [ |
24 | 38 | 'imports_order' => ['class', 'function', 'const'], |
25 | 39 | 'sort_algorithm' => 'alpha', |
26 | 40 | ], |
27 | 41 | ) |
28 | 42 | ->withConfiguredRule( |
29 | | - VisibilityRequiredFixer::class, |
| 43 | + \PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer::class, |
30 | 44 | [ |
31 | 45 | 'elements' => [], |
32 | 46 | ], |
|
48 | 62 | ) |
49 | 63 | ->withRules( |
50 | 64 | [ |
51 | | - NoUnusedImportsFixer::class, |
52 | | - OrderedClassElementsFixer::class, |
53 | | - OrderedTraitsFixer::class, |
54 | | - SingleQuoteFixer::class, |
| 65 | + \PhpCsFixer\Fixer\ClassNotation\OrderedTraitsFixer::class, |
| 66 | + \PhpCsFixer\Fixer\Import\NoUnusedImportsFixer::class, |
| 67 | + \PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer::class, |
55 | 68 | ] |
56 | | - ) |
57 | | - ->withSkip( |
58 | | - [ |
59 | | - '*/src/framework/resource/layout/*', |
60 | | - '*/src/usecase/contact/view/*', |
61 | | - '*/src/usecase/site/view/*', |
62 | | - ], |
63 | 69 | ); |
0 commit comments