2018-04-01 22:40:05 +00:00
|
|
|
imports:
|
2019-05-28 16:27:46 +00:00
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/set/psr2.yaml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/set/php71.yaml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/set/symplify.yaml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/set/common.yaml' }
|
|
|
|
- { resource: 'vendor/symplify/easy-coding-standard/config/set/clean-code.yaml' }
|
2017-08-04 06:20:18 +00:00
|
|
|
|
2018-04-01 22:40:05 +00:00
|
|
|
services:
|
2018-09-24 16:06:41 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
|
|
|
|
allow_classes:
|
|
|
|
- 'SomeClass' # from PHPUnit
|
2019-03-15 10:53:06 +00:00
|
|
|
- 'PHPUnit\Framework\TestCase' # usually part of node construction, it can be missed
|
2018-09-24 16:06:41 +00:00
|
|
|
|
2018-06-02 14:09:48 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
2019-02-21 11:08:26 +00:00
|
|
|
max_cognitive_complexity: 9
|
2018-06-02 14:09:48 +00:00
|
|
|
|
2018-09-19 16:33:11 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Order\MethodOrderByTypeFixer:
|
|
|
|
method_order_by_type:
|
|
|
|
Rector\Contract\Rector\PhpRectorInterface:
|
2018-09-19 17:21:47 +00:00
|
|
|
- 'getDefinition'
|
|
|
|
- 'getNodeTypes'
|
|
|
|
- 'refactor'
|
2018-09-19 16:33:11 +00:00
|
|
|
|
2017-08-31 22:31:12 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
|
2019-02-21 11:08:26 +00:00
|
|
|
extra_allowed_classes:
|
2018-11-03 09:35:05 +00:00
|
|
|
- 'PHPStan\Type\*'
|
2018-12-21 14:24:14 +00:00
|
|
|
- 'PHPStan\Analyser\Scope'
|
|
|
|
- 'PhpParser\NodeVisitor\NameResolver'
|
2017-09-03 12:37:36 +00:00
|
|
|
- 'PhpParser\Node\*'
|
2019-07-16 09:07:26 +00:00
|
|
|
- '*Data'
|
2018-11-05 08:08:27 +00:00
|
|
|
- 'PhpParser\Comment'
|
2019-05-23 17:32:46 +00:00
|
|
|
- 'PhpParser\Lexer'
|
2017-08-31 22:31:12 +00:00
|
|
|
- 'PhpParser\Comment\Doc'
|
2017-12-21 22:18:33 +00:00
|
|
|
- 'PhpParser\NodeTraverser'
|
2018-02-08 15:51:16 +00:00
|
|
|
- 'Rector\Reporting\FileDiff'
|
2018-04-02 23:11:23 +00:00
|
|
|
- 'Rector\RectorDefinition\*'
|
2018-09-17 10:38:11 +00:00
|
|
|
- 'Rector\Application\Error'
|
2018-10-05 17:13:09 +00:00
|
|
|
- 'Rector\DependencyInjection\Loader\*'
|
2018-12-21 14:24:14 +00:00
|
|
|
- 'Symplify\PackageBuilder\*'
|
|
|
|
- 'Symfony\Component\Console\Input\*Input'
|
2019-08-04 12:20:01 +00:00
|
|
|
- '*ValueObject'
|
2019-08-05 07:37:13 +00:00
|
|
|
- 'PHPStan\Analyser\NameScope'
|
2017-08-31 22:31:12 +00:00
|
|
|
|
2017-10-18 12:52:18 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
|
|
extra_skipped_classes:
|
|
|
|
- 'PhpParser\PrettyPrinter\Standard'
|
|
|
|
|
2018-07-06 16:33:01 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
2019-02-21 11:08:26 +00:00
|
|
|
extra_parent_types_to_suffixes:
|
2018-07-06 16:33:01 +00:00
|
|
|
- 'Rector'
|
2018-08-10 12:26:05 +00:00
|
|
|
- 'NodeVisitorAbstract'
|
2018-02-25 17:34:21 +00:00
|
|
|
|
2017-08-09 15:37:49 +00:00
|
|
|
parameters:
|
2018-04-08 18:45:10 +00:00
|
|
|
exclude_files:
|
2019-03-03 23:43:34 +00:00
|
|
|
- '*tests/**Source/*.php'
|
2018-08-14 11:24:34 +00:00
|
|
|
# tests files
|
2018-12-06 00:55:00 +00:00
|
|
|
- '*tests/*/Fixture/*'
|
2018-09-28 11:36:02 +00:00
|
|
|
- '*tests/*/Expected/*'
|
2019-02-21 14:36:16 +00:00
|
|
|
- '*utils/ContributorTools/templates/*'
|
2018-04-08 18:45:10 +00:00
|
|
|
|
2017-08-09 15:37:49 +00:00
|
|
|
skip:
|
2019-05-28 16:27:46 +00:00
|
|
|
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.Underscore: ~
|
2019-03-07 23:15:24 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\Architecture\DuplicatedClassShortNameSniff: ~
|
2019-03-31 18:13:46 +00:00
|
|
|
# skip temporary due to missing "import" feature in PhpStorm
|
|
|
|
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff.PartialUse: ~
|
2019-03-07 23:15:24 +00:00
|
|
|
|
2019-03-03 23:43:34 +00:00
|
|
|
# run manually from time to time - performance demanding + not to bother user with it
|
2019-02-02 16:12:12 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Order\PropertyOrderByComplexityFixer: ~
|
|
|
|
Symplify\CodingStandard\Fixer\Order\PrivateMethodOrderByUseFixer: ~
|
2019-01-22 19:40:27 +00:00
|
|
|
|
2019-01-08 10:37:34 +00:00
|
|
|
PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer:
|
|
|
|
- 'packages/Php/src/Rector/Double/RealToFloatTypeCastRector.php'
|
|
|
|
|
2019-05-19 21:44:38 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenReferenceSniff: ~
|
2019-01-22 19:40:27 +00:00
|
|
|
|
2017-08-12 11:34:40 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
|
2017-08-24 10:13:51 +00:00
|
|
|
# classes might not exist
|
2019-08-27 16:09:43 +00:00
|
|
|
- 'packages/*Class.php'
|
2018-08-03 07:17:19 +00:00
|
|
|
- 'bin/bootstrap.php'
|
2018-06-02 11:41:07 +00:00
|
|
|
- '*/packages/*/src/Rector/*Rector.php'
|
2018-07-25 11:06:07 +00:00
|
|
|
- 'src/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php'
|
|
|
|
- 'src/Rector/Constant/RenameClassConstantsUseToStringsRector.php'
|
2018-04-01 22:40:05 +00:00
|
|
|
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver.php'
|
|
|
|
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver/*Test.php'
|
2018-12-08 13:36:29 +00:00
|
|
|
- '*RectorTest.php'
|
2018-04-01 22:40:05 +00:00
|
|
|
- 'src/Rector/AbstractPHPUnitRector.php'
|
2018-07-31 06:16:29 +00:00
|
|
|
- 'src/Rector/Class_/ParentClassToTraitsRector.php'
|
2018-11-28 23:56:59 +00:00
|
|
|
# required for exact string match with "\"
|
|
|
|
- 'packages/NodeTypeResolver/src/Php/AbstractTypeInfo.php'
|
2018-08-02 10:58:42 +00:00
|
|
|
# example in description
|
2019-03-09 13:15:14 +00:00
|
|
|
- 'src/Rector/Annotation/RenameAnnotationRector.php'
|
2019-02-09 17:23:03 +00:00
|
|
|
- 'packages/NetteToSymfony/src/Event/EventInfosFactory.php'
|
2019-03-16 21:52:33 +00:00
|
|
|
- 'packages/NetteTesterToPHPUnit/src/AssertManipulator.php'
|
2019-06-23 17:43:54 +00:00
|
|
|
- 'src/PhpParser/Node/Manipulator/CallManipulator.php'
|
2018-02-16 11:36:55 +00:00
|
|
|
|
2018-07-18 12:56:04 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff:
|
2018-12-16 23:00:16 +00:00
|
|
|
- 'src/Util/*.php'
|
2019-02-28 21:50:53 +00:00
|
|
|
- 'packages/BetterPhpDocParser/src/Annotation/AnnotationNaming.php'
|
2019-08-10 10:05:18 +00:00
|
|
|
- 'src/Testing/PHPUnit/PHPUnitEnvironment.php'
|
2019-08-26 09:37:02 +00:00
|
|
|
# honesty first
|
|
|
|
- 'src/*StaticHelper.php'
|
2018-08-05 15:11:56 +00:00
|
|
|
|
2018-08-06 12:16:17 +00:00
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
|
|
- 'packages/NodeTypeResolver/src/PHPStan/Scope/NodeScopeResolver.php'
|
2018-08-10 12:26:05 +00:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
|
|
|
# hidden API
|
|
|
|
- 'src/Rector/AbstractRector.php'
|
2018-09-26 11:41:53 +00:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
|
|
|
# tough logic
|
2019-08-27 16:23:50 +00:00
|
|
|
- 'packages/DoctrinePhpDocParser/src/Ast/PhpDoc/*/*TagValueNode.php'
|
2019-08-17 12:24:36 +00:00
|
|
|
- 'packages/NodeTypeResolver/src/PhpDoc/NodeAnalyzer/FqnNamePhpDocNodeDecorator.php'
|
2019-07-06 21:27:44 +00:00
|
|
|
- 'packages/NodeTypeResolver/src/PHPStan/Type/StaticTypeAnalyzer.php'
|
2019-07-09 17:36:42 +00:00
|
|
|
- 'src/NodeContainer/ParsedNodesByType.php'
|
2019-07-05 12:14:36 +00:00
|
|
|
- 'packages/PHPStan/src/Rector/Node/RemoveNonExistingVarAnnotationRector.php'
|
2019-07-04 22:19:02 +00:00
|
|
|
- 'packages/Architecture/src/Rector/Class_/ConstructorInjectionToActionInjectionRector.php'
|
2019-06-03 07:34:55 +00:00
|
|
|
- 'src/PhpParser/Node/Commander/NodeRemovingCommander.php'
|
|
|
|
- 'packages/BetterPhpDocParser/src/*'
|
2019-05-31 21:26:19 +00:00
|
|
|
- 'packages/Symfony/src/Rector/Class_/MakeCommandLazyRector.php'
|
2019-05-26 12:43:20 +00:00
|
|
|
- 'packages/Legacy/src/Rector/ClassMethod/ChangeSingletonToServiceRector.php'
|
2019-05-01 18:51:58 +00:00
|
|
|
- 'src/Rector/Psr4/MultipleClassFileToPsr4ClassesRector.php'
|
2019-02-21 11:08:26 +00:00
|
|
|
- 'src/PhpParser/Node/Resolver/NameResolver.php'
|
|
|
|
- 'src/Rector/MethodBody/NormalToFluentRector.php'
|
2019-02-21 14:36:16 +00:00
|
|
|
- 'packages/CodingStyle/src/Rector/Use_/RemoveUnusedAliasRector.php'
|
|
|
|
- 'packages/NetteToSymfony/src/Route/RouteInfoFactory.php'
|
2019-08-24 10:58:23 +00:00
|
|
|
- 'utils/*/DumpNodesCommand.php'
|
2019-02-26 17:19:37 +00:00
|
|
|
- 'packages/CodeQuality/src/Rector/Identical/SimplifyBoolIdenticalTrueRector.php'
|
2019-02-28 21:50:53 +00:00
|
|
|
- 'packages/BetterPhpDocParser/src/Attributes/Ast/AttributeAwareNodeFactory.php'
|
2019-03-10 12:18:16 +00:00
|
|
|
- 'packages/Laravel/src/Rector/FuncCall/HelperFunctionToConstructorInjectionRector.php'
|
2019-03-22 10:48:41 +00:00
|
|
|
- 'packages/PhpSpecToPHPUnit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
|
2019-03-25 17:32:44 +00:00
|
|
|
- 'packages/NetteTesterToPHPUnit/src/AssertManipulator.php'
|
2019-05-26 12:43:20 +00:00
|
|
|
- 'packages/Legacy/src/NodeAnalyzer/SingletonClassMethodAnalyzer.php'
|
2019-04-17 15:04:29 +00:00
|
|
|
# aliases
|
|
|
|
- 'packages/CodingStyle/src/Rector/Namespace_/ImportFullyQualifiedNamesRector.php'
|
2019-02-02 14:31:43 +00:00
|
|
|
|
2018-10-08 05:19:10 +00:00
|
|
|
# copied 3rd party logic
|
|
|
|
- 'packages/Php/src/EregToPcreTransformer.php'
|
2018-11-28 23:56:59 +00:00
|
|
|
# dev
|
2019-05-09 10:09:33 +00:00
|
|
|
- 'packages/TypeDeclaration/src/Rector/FunctionLike/*TypeDeclarationRector.php'
|
2018-12-31 15:29:12 +00:00
|
|
|
- 'packages/Php/src/Rector/If_/IfToSpaceshipRector.php'
|
2018-09-27 16:42:11 +00:00
|
|
|
|
2018-09-29 17:46:27 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\ControlStructure\SprintfOverContactSniff:
|
|
|
|
# respects inherited pattern for better comparing
|
2018-11-04 01:17:02 +00:00
|
|
|
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
|
2018-10-05 14:09:00 +00:00
|
|
|
|
|
|
|
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: ~
|
2018-10-05 17:13:09 +00:00
|
|
|
|
|
|
|
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingParameterTypeHint:
|
|
|
|
# 3rd party parent code
|
|
|
|
- 'src/DependencyInjection/Loader/TolerantRectorYamlFileLoader.php'
|
2018-11-28 23:56:59 +00:00
|
|
|
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
|
2019-02-06 11:23:31 +00:00
|
|
|
- 'tests/AbstractContainerAwareTestCase.php'
|
2018-10-07 09:53:59 +00:00
|
|
|
|
2019-04-29 04:18:05 +00:00
|
|
|
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingTraversableReturnTypeHintSpecification:
|
|
|
|
# false positive
|
|
|
|
- 'src/Testing/PHPUnit/AbstractRectorTestCase.php'
|
|
|
|
|
2018-10-07 09:53:59 +00:00
|
|
|
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found:
|
|
|
|
# notes
|
|
|
|
- 'packages/Php/src/Rector/Each/ListEachRector.php'
|
2019-02-17 12:50:24 +00:00
|
|
|
- 'packages/DeadCode/src/Rector/ClassMethod/RemoveOverriddenValuesRector.php'
|
2019-03-22 10:48:41 +00:00
|
|
|
- 'packages/PhpSpecToPHPUnit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
|
2019-01-31 21:31:42 +00:00
|
|
|
|
|
|
|
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
|
|
|
|
# 3rd party api
|
|
|
|
- 'src/PhpParser/Node/Value/ValueResolver.php'
|
2019-07-16 09:07:26 +00:00
|
|
|
|
|
|
|
PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer:
|
|
|
|
# intentional equals
|
|
|
|
- 'tests/PhpParser/Node/NodeFactoryTest.php'
|