Files
core/easy-coding-standard.yml
Jarek Jakubowski b900a2725c cs fixes
2019-01-16 13:59:58 +01:00

109 lines
4.6 KiB
YAML

imports:
- { resource: 'vendor/symplify/easy-coding-standard/config/clean-code.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/common.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php70.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php71.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/psr2.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/psr12.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/symfony.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/symfony-risky.yml' }
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\OrderedClassElementsFixer:
order:
- 'use_trait'
PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer:
elements:
- 'const'
- 'method'
- 'property'
PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer: ~
PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer: ~
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
spacing: 'one'
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
exclude_checkers:
- '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