2018-04-02 00:40:05 +02:00
|
|
|
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/symplify.yml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/common.yml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/clean-code.yml' }
|
2017-08-04 08:20:18 +02:00
|
|
|
|
2018-04-02 00:40:05 +02:00
|
|
|
services:
|
2018-09-28 00:42:11 +08:00
|
|
|
SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff: ~
|
|
|
|
|
2018-09-24 18:06:41 +02:00
|
|
|
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
|
|
|
|
allow_classes:
|
|
|
|
- 'SomeClass' # from PHPUnit
|
|
|
|
|
2018-06-02 16:09:48 +02:00
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
2018-07-06 18:33:01 +02:00
|
|
|
maxCognitiveComplexity: 8
|
2018-06-02 16:09:48 +02:00
|
|
|
|
2018-09-19 18:33:11 +02:00
|
|
|
Symplify\CodingStandard\Fixer\Order\MethodOrderByTypeFixer:
|
|
|
|
method_order_by_type:
|
|
|
|
Rector\Contract\Rector\PhpRectorInterface:
|
2018-09-19 19:21:47 +02:00
|
|
|
- 'getDefinition'
|
|
|
|
- 'getNodeTypes'
|
|
|
|
- 'refactor'
|
|
|
|
Rector\YamlRector\Contract\YamlRectorInterface:
|
|
|
|
- 'getDefinition'
|
|
|
|
- 'refactor'
|
2018-09-19 18:33:11 +02:00
|
|
|
|
2017-09-01 00:31:12 +02:00
|
|
|
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
|
|
|
|
extraAllowedClasses:
|
2017-09-03 14:37:36 +02:00
|
|
|
- 'PhpParser\Node\*'
|
2018-10-06 01:13:09 +08:00
|
|
|
- 'Symplify\PackageBuilder\*'
|
2017-09-01 00:31:12 +02:00
|
|
|
- 'PhpParser\Comment\Doc'
|
2017-12-21 23:18:33 +01:00
|
|
|
- 'PhpParser\NodeTraverser'
|
2017-09-09 20:33:01 +02:00
|
|
|
- 'Rector\DeprecationExtractor\Deprecation\*'
|
2018-02-08 16:51:16 +01:00
|
|
|
- 'Rector\Reporting\FileDiff'
|
2018-04-03 01:11:23 +02:00
|
|
|
- 'Rector\RectorDefinition\*'
|
2018-08-03 16:20:24 +02:00
|
|
|
- 'PHPStan\Analyser\Scope'
|
2018-08-05 10:58:42 +02:00
|
|
|
- 'PhpParser\NodeVisitor\NameResolver'
|
2018-09-17 12:38:11 +02:00
|
|
|
- 'Rector\Application\Error'
|
2018-10-06 01:13:09 +08:00
|
|
|
- 'Rector\DependencyInjection\Loader\*'
|
2017-09-01 00:31:12 +02:00
|
|
|
|
2017-10-18 14:52:18 +02:00
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
|
|
extra_skipped_classes:
|
|
|
|
- 'PhpParser\PrettyPrinter\Standard'
|
|
|
|
- 'PhpParser\Node'
|
|
|
|
|
2018-07-06 18:33:01 +02:00
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
|
|
|
extraParentTypesToSuffixes:
|
|
|
|
- 'Rector'
|
2018-08-10 14:26:05 +02:00
|
|
|
- 'NodeVisitorAbstract'
|
2018-02-25 18:34:21 +01:00
|
|
|
|
2017-08-09 17:37:49 +02:00
|
|
|
parameters:
|
2018-04-08 20:45:10 +02:00
|
|
|
exclude_files:
|
2018-04-10 09:42:26 +02:00
|
|
|
- '*tests/*Source/*.php'
|
2018-08-14 13:24:34 +02:00
|
|
|
# tests files
|
|
|
|
- '*tests/*/Wrong/*'
|
|
|
|
- '*tests/*/Correct/*'
|
2018-09-28 19:36:02 +08:00
|
|
|
- '*tests/*/Expected/*'
|
2018-10-13 18:34:37 +08:00
|
|
|
- '*packages/ContributorTools/templates/*'
|
2018-04-08 20:45:10 +02:00
|
|
|
|
2017-08-09 17:37:49 +02:00
|
|
|
skip:
|
2017-08-12 13:34:40 +02:00
|
|
|
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
|
2017-08-24 12:13:51 +02:00
|
|
|
# classes might not exist
|
2018-08-03 09:17:19 +02:00
|
|
|
- 'bin/bootstrap.php'
|
2018-06-02 13:41:07 +02:00
|
|
|
- '*/packages/*/src/Rector/*Rector.php'
|
2018-07-25 13:06:07 +02:00
|
|
|
- 'src/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php'
|
|
|
|
- 'src/Rector/Constant/RenameClassConstantsUseToStringsRector.php'
|
2018-04-02 00:40:05 +02:00
|
|
|
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver.php'
|
|
|
|
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver/*Test.php'
|
2018-08-02 12:58:42 +02:00
|
|
|
- 'tests/NodeAnalyzer/ClassLikeAnalyzerTest.php'
|
|
|
|
- 'tests/NodeValueResolver/ConstExprEvaluatorFactoryTest.php'
|
2018-04-02 00:40:05 +02:00
|
|
|
- 'src/Rector/AbstractPHPUnitRector.php'
|
2018-07-31 08:16:29 +02:00
|
|
|
- 'src/Rector/Class_/ParentClassToTraitsRector.php'
|
2018-08-02 12:58:42 +02:00
|
|
|
# example in description
|
|
|
|
- 'src/Rector/Assign/PropertyAssignToMethodCallRector.php'
|
|
|
|
- 'src/Rector/Constant/ClassConstantReplacerRector.php'
|
|
|
|
- 'src/Rector/Property/PropertyNameReplacerRector.php'
|
2018-08-04 09:33:54 +02:00
|
|
|
- 'src/Rector/Annotation/AnnotationReplacerRector.php'
|
|
|
|
- 'src/Rector/Argument/ArgumentAdderRector.php'
|
2018-08-28 18:27:13 +02:00
|
|
|
- 'src/Rector/Form/Helper/FormTypeStringToTypeProvider.php'
|
2018-02-16 12:36:55 +01:00
|
|
|
|
2017-12-21 19:14:22 +01:00
|
|
|
# empty arguments passing
|
2018-03-31 15:47:53 -03:00
|
|
|
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff.NotAtEnd:
|
2018-06-02 13:30:28 +02:00
|
|
|
- 'packages/PHPUnit/src/Rector/SpecificMethod/AssertTrueFalseToSpecificMethodRector.php'
|
2018-07-18 14:56:04 +02:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff:
|
|
|
|
- 'src/Configuration/Rector/Guard/RecipeGuard.php'
|
2018-08-05 17:11:56 +02:00
|
|
|
- 'src/Configuration/Rector/*Recipe.php'
|
|
|
|
|
2018-08-06 14:16:17 +02:00
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
|
|
- 'packages/NodeTypeResolver/src/PHPStan/Scope/NodeScopeResolver.php'
|
2018-08-10 14:26:05 +02:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
|
|
|
# hidden API
|
|
|
|
- 'src/Rector/AbstractRector.php'
|
2018-09-26 19:41:53 +08:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
|
|
|
# tough logic
|
|
|
|
- 'src/Rector/MethodBody/NormalToFluentRector.php'
|
2018-10-08 13:19:10 +08:00
|
|
|
# copied 3rd party logic
|
|
|
|
- 'packages/Php/src/EregToPcreTransformer.php'
|
2018-09-28 00:42:11 +08:00
|
|
|
|
|
|
|
SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff.UnusedParameter:
|
|
|
|
# enforced by interface
|
|
|
|
- '*Command.php'
|
|
|
|
- '*NodeVisitor.php'
|
2018-09-28 19:36:02 +08:00
|
|
|
- '*CompilerPass.php'
|
2018-09-28 00:42:11 +08:00
|
|
|
# array type check
|
|
|
|
- 'src/RectorDefinition/RectorDefinition.php'
|
2018-09-30 01:46:27 +08:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\ControlStructure\SprintfOverContactSniff:
|
|
|
|
# respects inherited pattern for better comparing
|
|
|
|
- 'src/Printer/BetterStandardPrinter.php'
|
2018-10-05 22:09:00 +08:00
|
|
|
|
|
|
|
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: ~
|
2018-10-06 01:13:09 +08:00
|
|
|
|
|
|
|
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingParameterTypeHint:
|
|
|
|
# 3rd party parent code
|
|
|
|
- 'src/DependencyInjection/Loader/TolerantRectorYamlFileLoader.php'
|
2018-10-07 17:53:59 +08:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found:
|
|
|
|
# notes
|
|
|
|
- 'packages/Php/src/Rector/Each/ListEachRector.php'
|