-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy-coding-standard.yml
61 lines (57 loc) · 3.25 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
imports:
- { resource: 'vendor/symplify/easy-coding-standard/config/psr2.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php71.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/clean-code.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/symplify.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/common.yml' }
services:
# code structure & complexity
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff:
absoluteLineLimit: 120
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
absoluteComplexity: 10
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff:
absoluteNestingLevel: 6
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\FunctionSpacingSniff:
spacingBeforeFirst: 1
spacingAfterLast: 1
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
maxCognitiveComplexity: 10
SlevomatCodingStandard\Sniffs\Classes\TraitUseSpacingSniff:
linesCountBeforeFirstUse: 1
linesCountAfterLastUse: 2
SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff:
newlinesCountBetweenOpenTagAndDeclare: 0
newlinesCountAfterDeclare: 2
spacesCountAroundEqualsSign: 1
# PHP
SlevomatCodingStandard\Sniffs\TypeHints\UselessConstantTypeHintSniff:
# Use statements
SlevomatCodingStandard\Sniffs\Namespaces\AlphabeticallySortedUsesSniff:
SlevomatCodingStandard\Sniffs\Namespaces\UnusedUsesSniff:
searchAnnotations: TRUE
parameters:
indentation: tab
skip:
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff:
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
Symplify\CodingStandard\Sniffs\Property\DynamicPropertySniff:
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
PhpCsFixer\Fixer\Operator\NewWithBracesFixer:
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
Symplify\CodingStandard\Fixer\ClassNotation\LastPropertyAndFirstMethodSeparationFixer:
PhpCsFixer\Fixer\Basic\BracesFixer:
PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer:
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff:
PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer:
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff:
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff:
SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff:
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff:
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
Symplify\CodingStandard\Sniffs\Commenting\VarConstantCommentSniff:
Symplify\CodingStandard\Sniffs\Architecture\ExplicitExceptionSniff:
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenReferenceSniff:
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff:
Symplify\CodingStandard\Sniffs\ControlStructure\SprintfOverContactSniff: