-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecs.php
More file actions
46 lines (42 loc) · 1.65 KB
/
Copy pathecs.php
File metadata and controls
46 lines (42 loc) · 1.65 KB
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
<?php declare(strict_types=1);
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withRootFiles()
->withRules([
\PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer::class,
\PhpCsFixer\Fixer\Import\NoUnusedImportsFixer::class,
])
->withPhpCsFixerSets(perCS20: true)
->withPreparedSets(psr12: true, common: true, symplify: true)
->withConfiguredRule(PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer::class, [
'property' => 'single',
'method' => 'single',
'const' => 'single',
])
->withConfiguredRule(PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer::class, [
'operators' => [
'=>' => 'align',
'=' => 'align',
],
])
->withConfiguredRule(PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer::class, [
'const' => 'single',
'method' => 'single',
'property' => 'single',
])
->withConfiguredRule(Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer::class, [
'inline_short_lines' => false,
])
->withSkip([
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer::class,
// <?php declare(strict_types=1); doesn't need to take up three or four lines:
PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer::class,
PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer::class,
Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer::class,
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer::class,
])
;