rector/easy-coding-standard.neon
2017-08-08 18:17:40 +02:00

69 lines
2.7 KiB
Plaintext

includes:
- vendor/symplify/easy-coding-standard/config/psr2-checkers.neon
- vendor/symplify/easy-coding-standard/config/php70-checkers.neon
- vendor/symplify/easy-coding-standard/config/php71-checkers.neon
checkers:
# Slevomat
- SlevomatCodingStandard\Sniffs\ControlStructures\YodaComparisonSniff
- SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff
- SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
allowPartialUses: false
allowFullyQualifiedNameForCollidingClasses: false
allowFullyQualifiedGlobalClasses: true
- SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff
# Files
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff:
absoluteLineLimit: 120
# PSR-4
- PhpCsFixer\Fixer\Basic\Psr4Fixer
# Code Analysis
- PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
absoluteComplexity: 5
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff:
absoluteNestingLevel: 3
# Naming Conventions
- PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff
# PHP
- PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\NonExecutableCodeSniff
# WhiteSpace
- PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\LanguageConstructSpacingSniff
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff:
ignoreBlankLines: false
# Namespaces
- PhpCsFixer\Fixer\Import\OrderedImportsFixer
- PhpCsFixer\Fixer\Import\NoUnusedImportsFixer
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
spacing: one
- PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer
- PhpCsFixer\Fixer\Semicolon\SemicolonAfterInstructionFixer
- PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer
- PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer
- PhpCsFixer\Fixer\ReturnNotation\NoUselessReturnFixer
- PhpCsFixer\Fixer\Strict\StrictComparisonFixer
PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer:
annotations:
- author
- throws
- expectedException
# PHPUnit
- PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer
# new since PhpCsFixer 2.2-2.4
- PhpCsFixer\Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer
PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer:
use_yoda_style: false
- PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer
- PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer
- PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer