-
Notifications
You must be signed in to change notification settings - Fork 1
/
easy-coding-standard.yml
100 lines (84 loc) · 4.13 KB
/
easy-coding-standard.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
imports:
- { resource: 'vendor/symplify/easy-coding-standard/config/set/clean-code.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/common.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/php70.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/php71.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/psr2.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/psr12.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/symfony.yaml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/set/symfony-risky.yaml' }
services:
# most of these services are taken from symplify.yml
# see https://github.com/Symplify/Symplify/blob/master/ecs.yml
# PHP 5.5
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer: ~
# Control Structures
Symplify\CodingStandard\Fixer\Property\ArrayPropertyDefaultValueFixer: ~
Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer: ~
Symplify\CodingStandard\Fixer\ControlStructure\RequireFollowedByAbsolutePathFixer: ~
# Spaces
Symplify\CodingStandard\Fixer\Strict\BlankLineAfterStrictTypesFixer: ~
# Comments
Symplify\CodingStandard\Fixer\Commenting\RemoveSuperfluousDocBlockWhitespaceFixer: ~
# Naming
PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer: ~
# Debug
Symplify\CodingStandard\Sniffs\Debug\DebugFunctionCallSniff: ~
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff: ~
# final classes
PhpCsFixer\Fixer\ClassNotation\FinalInternalClassFixer: ~
# multibyte
PhpCsFixer\Fixer\Alias\MbStrFunctionsFixer: ~
# psr
PhpCsFixer\Fixer\Basic\Psr0Fixer: ~
PhpCsFixer\Fixer\Basic\Psr4Fixer: ~
PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer: ~
PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer: ~
PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer: ~
PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer: ~
PhpCsFixer\Fixer\Import\OrderedImportsFixer:
importsOrder:
- 'class'
- 'const'
- 'function'
PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer:
space: 'none'
PhpCsFixer\Fixer\Operator\NewWithBracesFixer: ~
PhpCsFixer\Fixer\Basic\BracesFixer:
'allow_single_line_closure': false
'position_after_functions_and_oop_constructs': 'next'
'position_after_control_structures': 'same'
'position_after_anonymous_constructs': 'same'
PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer: ~
PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer:
elements:
- 'const'
- 'method'
- 'property'
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer: ~
PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer: ~
PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer: ~
PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer: ~
PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer: ~
#remove useless phpdoc
PhpCsFixer\Fixer\FunctionNotation\PhpdocToReturnTypeFixer: ~
PhpCsFixer\Fixer\Import\FullyQualifiedStrictTypesFixer: ~
PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer: ~
#please yoda no
SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff: ~
parameters:
cache_directory: var/cache/ecs
skip:
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer: ~
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer: ~
PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer: ~
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer: ~
PhpCsFixer\Fixer\Operator\IncrementStyleFixer: ~
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocAnnotationWithoutDotFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer: ~
PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer: ~
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff: ~
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff: ~ #to be removed before beta release
Symplify\CodingStandard\Sniffs\Debug\DebugFunctionCallSniff: ~ #to be removed before beta release