-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheasy-coding-standard.neon
47 lines (41 loc) · 2.09 KB
/
easy-coding-standard.neon
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
includes:
- vendor/symplify/easy-coding-standard/config/symfony-checkers.neon
- vendor/symplify/easy-coding-standard/config/symfony-risky-checkers.neon
- vendor/symplify/easy-coding-standard/config/php54-checkers.neon
- vendor/symplify/easy-coding-standard/config/php70-checkers.neon
- vendor/symplify/easy-coding-standard/config/php71-checkers.neon
- vendor/symplify/easy-coding-standard/config/symplify-checkers.neon
- vendor/symplify/easy-coding-standard/config/common.neon
- vendor/symplify/easy-coding-standard/config/spaces.neon
checkers:
# Metrics
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff:
absoluteLineLimit: 120
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
absoluteComplexity: 7
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff:
absoluteNestingLevel: 4
# Type Hints
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
enableEachParameterAndReturnInspection: true
# Namespaces
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
allowPartialUses: false
parameters:
exclude_checkers:
- PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\FunctionCallSignatureSniff
- PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer
- PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer
- PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer
- PhpCsFixer\Fixer\Operator\NewWithBracesFixer
# strict rule on this code
- Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer
- Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff
- Symplify\CodingStandard\Sniffs\Property\DynamicPropertySniff
skip:
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
- app/bootstrap.php
skip_codes:
- SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.UselessDocComment
# many todos
- PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff.DetectedCATCH