forked from object-calisthenics/phpcs-calisthenics-rules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecs.yml
43 lines (37 loc) · 1.83 KB
/
ecs.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
imports:
- { resource: 'vendor/symplify/easy-coding-standard/config/symfony.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php70.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php71.yml' }
# custom
- { resource: 'vendor/symplify/easy-coding-standard/config/common.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/symplify.yml' }
- { resource: 'config/object-calisthenics.yml' }
services:
PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer:
equal: false
identical: false
less_and_greater: false
# Metrics
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
absoluteComplexity: 4
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff:
absoluteNestingLevel: 2
# Slevomat
SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff: ~
SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff: ~
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
enableEachParameterAndReturnInspection: true
parameters:
skip:
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
- '*src/ObjectCalisthenics/Sniffs/*/*Sniff.php'
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: ~
exclude_checkers:
- 'Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff'
# Symfony ruleset
- 'PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer'
- 'PhpCsFixer\Fixer\Operator\NewWithBracesFixer'
- 'PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer'
# mutually excluded
- 'SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff'
- 'PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer'