-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php-cs-fixer.php
58 lines (54 loc) · 2.35 KB
/
.php-cs-fixer.php
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
47
48
49
50
51
52
53
54
55
56
57
58
<?php
declare(strict_types=1);
use PhpCsFixer\Finder;
use PhpCsFixerCustomFixers\Fixer\NoDuplicatedArrayKeyFixer;
use PhpCsFixerCustomFixers\Fixer\NoTrailingCommaInSinglelineFixer;
use PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer;
use PhpCsFixerCustomFixers\Fixer\NoUselessStrlenFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocArrayStyleFixer;
use PhpCsFixerCustomFixers\Fixer\PhpUnitAssertArgumentsOrderFixer;
use PhpCsFixerCustomFixers\Fixer\PhpUnitDedicatedAssertFixer;
use PhpCsFixerCustomFixers\Fixers;
use PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer;
use PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer;
use PhpCsFixerCustomFixers\Fixer\NoDuplicatedImportsFixer;
use PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer;
use PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer;
use PhpCsFixerCustomFixers\Fixer\SingleSpaceBeforeStatementFixer;
use PhpCsFixerCustomFixers\Fixer\StringableInterfaceFixer;
$finder = Finder::create()
->in([__DIR__.'/src',])
;
return (new PhpCsFixer\Config())
->registerCustomFixers(new Fixers())
->setFinder($finder)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'declare_strict_types' => true,
'phpdoc_separation' => [
'groups' => [['ORM\\*'], ['Assert\\*']],
],
ConstructorEmptyBracesFixer::name() => true,
MultilinePromotedPropertiesFixer::name() => true,
NoDuplicatedImportsFixer::name() => true,
NoPhpStormGeneratedCommentFixer::name() => true,
PhpdocSelfAccessorFixer::name() => true,
PhpdocTypesTrimFixer::name() => true,
SingleSpaceAfterStatementFixer::name() => true,
SingleSpaceBeforeStatementFixer::name() => true,
StringableInterfaceFixer::name() => true,
NoDuplicatedArrayKeyFixer::name() => true,
NoTrailingCommaInSinglelineFixer::name() => true,
NoUselessDoctrineRepositoryCommentFixer::name() => true,
NoUselessStrlenFixer::name() => true,
PhpUnitAssertArgumentsOrderFixer::name() => true,
PhpUnitDedicatedAssertFixer::name() => true,
PhpdocArrayStyleFixer::name() => true,
])
->setRiskyAllowed(true)
->setLineEnding("\n")
;