From 5d1f28b1a1d550aceb3ffa2e9e71cfe69d1d7bfd Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Thu, 20 Jul 2023 21:12:23 +0200 Subject: [PATCH] fix: code style --- .gitignore | 1 + .php-cs-fixer.dist.php | 59 +++++++++++++ config/v6.5/flysystem-v3.php | 2 +- config/v6.5/renaming.php | 6 +- config/v6.5/typehints.php | 8 +- new.php | 83 +++++++++---------- rector.php | 2 +- ...ClassConstructorArgumentRequiredRector.php | 26 +++--- ...RemoveArgumentFromClassConstructRector.php | 18 ++-- ...AddArgumentToClassWithoutDefaultRector.php | 45 +++++----- ...terfaceReplacedWithAbstractClassRector.php | 14 ++-- .../v65/AddBanAllToReverseProxyRector.php | 29 ++++--- .../ContextMetadataExtensionToStateRector.php | 10 +-- .../v65/FakerPropertyToMethodCallRector.php | 8 +- .../MigrateCaptchaAnnotationToRouteRector.php | 43 +++++----- ...teLoginRequiredAnnotationToRouteRector.php | 16 ++-- .../v65/MigrateRouteScopeToRouteDefaults.php | 30 +++---- .../config/configured_rule.php | 2 +- .../config/configured_rule.php | 2 +- .../AddBanAllToReverseProxyRector.php | 5 ++ 20 files changed, 233 insertions(+), 176 deletions(-) create mode 100644 .php-cs-fixer.dist.php diff --git a/.gitignore b/.gitignore index 095d1e2..d7033e0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ vendor .phpunit.result.cache +.php-cs-fixer.cache # Devenv .devenv* diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..e568c65 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,59 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR12' => true, + '@PSR12:risky' => true, + '@PHP80Migration:risky' => true, + '@PHP81Migration' => true, + '@PhpCsFixer' => true, + '@Symfony' => true, + '@Symfony:risky' => true, + // Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line. + 'blank_line_after_opening_tag' => false, + // Using `isset($var) &&` multiple times should be done in one call. + 'combine_consecutive_issets' => false, + // Calling `unset` on multiple items should be done in one call. + 'combine_consecutive_unsets' => false, + // Concatenation should be spaced according configuration. + 'concat_space' => ['spacing'=>'one'], + // Pre- or post-increment and decrement operators should be used if possible. + 'increment_style' => ['style'=>'post'], + // Ensure there is no code on the same line as the PHP open tag. + 'linebreak_after_opening_tag' => false, + // Replace non multibyte-safe functions with corresponding mb function. + 'mb_str_functions' => true, + // Add leading `\` before function invocation to speed up resolving. + 'native_function_invocation' => false, + // Adds or removes `?` before type declarations for parameters with a default `null` value. + 'nullable_type_declaration_for_default_null_value' => true, + // All items of the given phpdoc tags must be either left-aligned or (by default) aligned vertically. + 'phpdoc_align' => ['align'=>'left'], + // PHPDoc summary should end in either a full stop, exclamation mark, or question mark. + 'phpdoc_summary' => false, + // Throwing exception must be done in single line. + 'single_line_throw' => false, + // Comparisons should be strict. + 'strict_comparison' => true, + // Functions should be used with `$strict` param set to `true`. + 'strict_param' => true, + // Anonymous functions with one-liner return statement must use arrow functions. + 'use_arrow_functions' => false, + // Write conditions in Yoda style (`true`), non-Yoda style (`['equal' => false, 'identical' => false, 'less_and_greater' => false]`) or ignore those conditions (`null`) based on configuration. + 'yoda_style' => false, + // Currently waiting for https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5572 to be implemented to ignore @var (needed for LSP) + 'phpdoc_to_comment' => false, + // Multi-line arrays, arguments list, parameters list and `match` expressions must have a trailing comma. + 'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']], + ]) + ->setFinder(PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('stubs') + ->in(__DIR__) + ) + ; \ No newline at end of file diff --git a/config/v6.5/flysystem-v3.php b/config/v6.5/flysystem-v3.php index d68c9ce..9b9b49b 100644 --- a/config/v6.5/flysystem-v3.php +++ b/config/v6.5/flysystem-v3.php @@ -18,7 +18,7 @@ 'League\\Flysystem\\FilesystemInterface' => 'League\\Flysystem\\FilesystemOperator', 'League\\Flysystem\\AdapterInterface' => 'League\\Flysystem\\FilesystemAdapter', 'League\\Flysystem\\Memory\\MemoryAdapter' => 'League\\Flysystem\\InMemory\\InMemoryFilesystemAdapter', - ] + ], ); $methodRenaming = []; diff --git a/config/v6.5/renaming.php b/config/v6.5/renaming.php index 1be7323..201a73a 100644 --- a/config/v6.5/renaming.php +++ b/config/v6.5/renaming.php @@ -79,8 +79,8 @@ 'Shopware\Core\Content\Flow\Dispatching\FlowState', 'sequenceId', 'getSequenceId', - null - )] + null, + )], ); $rectorConfig->ruleWithConfiguration( @@ -88,7 +88,7 @@ [ new InterfaceReplacedWithAbstractClass('Shopware\Core\Checkout\Cart\CartPersisterInterface', 'Shopware\Core\Checkout\Cart\AbstractCartPersister'), new InterfaceReplacedWithAbstractClass('Shopware\Core\Content\Sitemap\Provider\UrlProviderInterface', 'Shopware\Core\Content\Sitemap\Provider\AbstractUrlProvider'), - ] + ], ); $rectorConfig->rule(FakerPropertyToMethodCallRector::class); diff --git a/config/v6.5/typehints.php b/config/v6.5/typehints.php index 5fcc02a..2f7d7c9 100644 --- a/config/v6.5/typehints.php +++ b/config/v6.5/typehints.php @@ -33,7 +33,7 @@ new AddParamTypeDeclaration('Shopware\Core\Content\ProductStream\DataAbstractionLayer\ProductStreamIndexer', 'iterate', 0, new ArrayType(new StringType(), new StringType())), new AddParamTypeDeclaration('Shopware\Core\Content\Rule\DataAbstractionLayer\RuleIndexer', 'iterate', 0, new ArrayType(new StringType(), new StringType())), new AddParamTypeDeclaration('Shopware\\Storefront\\Page\\Product\\Review\\ReviewLoaderResult', 'setMatrix', 0, new ObjectType('Shopware\Core\Content\Product\SalesChannel\Review\RatingMatrix')), - ] + ], ); $rectorConfig->ruleWithConfiguration( @@ -43,7 +43,7 @@ new AddReturnTypeDeclaration('Shopware\Core\Content\Cms\DataResolver\CriteriaCollection', 'getIterator', new ObjectType('Traversable')), new AddReturnTypeDeclaration('Shopware\\Core\\Checkout\\Cart\\CartBehavior', 'hasPermission', new BooleanType()), new AddReturnTypeDeclaration('Shopware\\Storefront\\Page\\Product\\Review\\ReviewLoaderResult', 'getMatrix', new ObjectType('Shopware\Core\Content\Product\SalesChannel\Review\RatingMatrix')), - ] + ], ); $rectorConfig->ruleWithConfiguration( @@ -51,14 +51,14 @@ [ new AddArgumentToClassWithoutDefault('Shopware\Storefront\Framework\Captcha\AbstractCaptcha', 'supports', 1, 'captchaConfig', new ArrayType(new StringType(), new StringType())), new AddArgumentToClassWithoutDefault('Shopware\Storefront\Framework\Cache\ReverseProxy\AbstractReverseProxyGateway', 'tag', 2, 'response', new ObjectType('Symfony\Component\HttpFoundation\Response')), - ] + ], ); $rectorConfig->ruleWithConfiguration( ArgumentAdderRector::class, [ new ArgumentAdder('Shopware\Core\Content\Media\Thumbnail\ThumbnailService', 'updateThumbnails', 2, 'strict', false, new BooleanType()), - ] + ], ); $rectorConfig->rule(AddBanAllToReverseProxyRector::class); diff --git a/new.php b/new.php index bc377e5..6ee650e 100644 --- a/new.php +++ b/new.php @@ -1,58 +1,55 @@ - 'Frosh\Rector\Rule\\' . $place, @@ -60,4 +57,4 @@ public function refactor(Node $node): ?Node ]; $rector = str_replace(array_keys($vals), $vals, $rectorTpl); -file_put_contents(sprintf('%s/src/Rule/%s/%s.php', __DIR__, $place, $name), $rector,LOCK_EX); \ No newline at end of file +file_put_contents(sprintf('%s/src/Rule/%s/%s.php', __DIR__, $place, $name), $rector, \LOCK_EX); diff --git a/rector.php b/rector.php index 394b45f..b6328ae 100644 --- a/rector.php +++ b/rector.php @@ -7,7 +7,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ - __DIR__ . '/src' + __DIR__ . '/src', ]); $rectorConfig->importNames(); diff --git a/src/Rule/ClassConstructor/MakeClassConstructorArgumentRequiredRector.php b/src/Rule/ClassConstructor/MakeClassConstructorArgumentRequiredRector.php index 52248e2..4ad2a05 100644 --- a/src/Rule/ClassConstructor/MakeClassConstructorArgumentRequiredRector.php +++ b/src/Rule/ClassConstructor/MakeClassConstructorArgumentRequiredRector.php @@ -27,21 +27,21 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition('NAME', [ new ConfiguredCodeSample( <<<'PHP' -class Foo { - public function __construct(array $foo = []) - { - } -} -PHP + class Foo { + public function __construct(array $foo = []) + { + } + } + PHP , <<<'PHP' -class Foo { - public function __construct(array $foo) - { - } -} -PHP, - [new MakeClassConstructorArgumentRequired('Foo', 0, new ArrayType(new StringType(), new StringType()))] + class Foo { + public function __construct(array $foo) + { + } + } + PHP, + [new MakeClassConstructorArgumentRequired('Foo', 0, new ArrayType(new StringType(), new StringType()))], ), ]); } diff --git a/src/Rule/ClassConstructor/RemoveArgumentFromClassConstructRector.php b/src/Rule/ClassConstructor/RemoveArgumentFromClassConstructRector.php index 313e2d2..7b37ad2 100644 --- a/src/Rule/ClassConstructor/RemoveArgumentFromClassConstructRector.php +++ b/src/Rule/ClassConstructor/RemoveArgumentFromClassConstructRector.php @@ -4,7 +4,6 @@ namespace Frosh\Rector\Rule\ClassConstructor; -use function array_values; use Frosh\Rector\Rule\ClassMethod\AddArgumentToClassWithoutDefault; use PhpParser\Node; use PhpParser\Node\Expr\New_; @@ -29,18 +28,18 @@ public function getRuleDefinition(): RuleDefinition [ new ConfiguredCodeSample( <<<'CODE_SAMPLE' -$someObject = new SomeExampleClass($example); -CODE_SAMPLE + $someObject = new SomeExampleClass($example); + CODE_SAMPLE , <<<'CODE_SAMPLE' -$someObject = new SomeExampleClass(); -CODE_SAMPLE + $someObject = new SomeExampleClass(); + CODE_SAMPLE , [ new RemoveArgumentFromClassConstruct('SomeExampleClass', 0), - ] + ], ), - ] + ], ); } @@ -66,7 +65,6 @@ public function refactor(Node $node) /** * @param AddArgumentToClassWithoutDefault[] $configuration - * @return void */ public function configure(array $configuration): void { @@ -91,7 +89,7 @@ private function rebuildNew(New_ $node): ?Node } if ($hasChanged) { - $node->args = array_values($node->args); + $node->args = \array_values($node->args); return $node; } @@ -127,7 +125,7 @@ private function rebuildConstructor(ClassMethod $node): ?Node } if ($hasChanged) { - $node->params = array_values($node->params); + $node->params = \array_values($node->params); return $node; } diff --git a/src/Rule/ClassMethod/AddArgumentToClassWithoutDefaultRector.php b/src/Rule/ClassMethod/AddArgumentToClassWithoutDefaultRector.php index c3dd639..814249c 100644 --- a/src/Rule/ClassMethod/AddArgumentToClassWithoutDefaultRector.php +++ b/src/Rule/ClassMethod/AddArgumentToClassWithoutDefaultRector.php @@ -32,33 +32,33 @@ public function getRuleDefinition(): RuleDefinition [ new ConfiguredCodeSample( <<<'CODE_SAMPLE' -$someObject = new SomeExampleClass; -$someObject->someMethod(); - -class MyCustomClass extends SomeExampleClass -{ - public function someMethod() - { - } -} -CODE_SAMPLE + $someObject = new SomeExampleClass; + $someObject->someMethod(); + + class MyCustomClass extends SomeExampleClass + { + public function someMethod() + { + } + } + CODE_SAMPLE , <<<'CODE_SAMPLE' -$someObject = new SomeExampleClass; -$someObject->someMethod(true); - -class MyCustomClass extends SomeExampleClass -{ - public function someMethod($value) - { - } -} -CODE_SAMPLE + $someObject = new SomeExampleClass; + $someObject->someMethod(true); + + class MyCustomClass extends SomeExampleClass + { + public function someMethod($value) + { + } + } + CODE_SAMPLE , [ - new AddArgumentToClassWithoutDefault('SomeExampleClass', 'someMethod', 0, 'someArgument', new ObjectType('SomeType')), ] + new AddArgumentToClassWithoutDefault('SomeExampleClass', 'someMethod', 0, 'someArgument', new ObjectType('SomeType')), ], ), - ] + ], ); } @@ -121,6 +121,7 @@ private function isObjectTypeMatch(Node $node, ObjectType $objectType): bool if (!$classLike instanceof Class_) { return false; } + return $this->isObjectType($classLike, $objectType); } } diff --git a/src/Rule/Class_/InterfaceReplacedWithAbstractClassRector.php b/src/Rule/Class_/InterfaceReplacedWithAbstractClassRector.php index 0421e3f..e2f4d44 100644 --- a/src/Rule/Class_/InterfaceReplacedWithAbstractClassRector.php +++ b/src/Rule/Class_/InterfaceReplacedWithAbstractClassRector.php @@ -22,17 +22,17 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition('Replace UrlProviderInterface with AbstractClass', [ new ConfiguredCodeSample( <<<'CODE_SAMPLE' -class Foo implements Test { + class Foo implements Test { -} -CODE_SAMPLE + } + CODE_SAMPLE , <<<'PHP' -class Foo extends AbstractTest { + class Foo extends AbstractTest { -} -PHP, - [new InterfaceReplacedWithAbstractClass('Foo', 'AbstractTest')] + } + PHP, + [new InterfaceReplacedWithAbstractClass('Foo', 'AbstractTest')], ), ]); } diff --git a/src/Rule/v65/AddBanAllToReverseProxyRector.php b/src/Rule/v65/AddBanAllToReverseProxyRector.php index afbc178..3670656 100644 --- a/src/Rule/v65/AddBanAllToReverseProxyRector.php +++ b/src/Rule/v65/AddBanAllToReverseProxyRector.php @@ -4,8 +4,6 @@ namespace Frosh\Rector\Rule\v65; -use function array_map; -use function in_array; use PhpParser\BuilderFactory; use PhpParser\Node; use PhpParser\Node\Stmt\Class_; @@ -22,18 +20,18 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition('Adds banAll method to reverse proxy', [ new CodeSample( <<<'CODE_SAMPLE' -class Test extends \Shopware\Core\Framework\Cache\ReverseProxy\AbstractReverseProxyGateway { + class Test extends \Shopware\Core\Framework\Cache\ReverseProxy\AbstractReverseProxyGateway { -} -CODE_SAMPLE + } + CODE_SAMPLE , <<<'CODE_SAMPLE' -class Test extends \Shopware\Core\Framework\Cache\ReverseProxy\AbstractReverseProxyGateway { - public function banAll(): void - { - } -} -CODE_SAMPLE + class Test extends \Shopware\Core\Framework\Cache\ReverseProxy\AbstractReverseProxyGateway { + public function banAll(): void + { + } + } + CODE_SAMPLE ), ]); } @@ -56,20 +54,21 @@ public function refactor(Node $node) $nodeFinder = new NodeFinder(); // phpstan-ignore-next-line they should add template support - $methodNames = array_map(static function (Node\Stmt\ClassMethod $method) { + $methodNames = \array_map(static function (Node\Stmt\ClassMethod $method) { return (string) $method->name; }, $nodeFinder->findInstanceOf([$node], Node\Stmt\ClassMethod::class)); - if (in_array('banAll', $methodNames, true)) { + if (\in_array('banAll', $methodNames, true)) { return null; } $builderFactory = new BuilderFactory(); - $node->stmts[] = ($builderFactory) + $node->stmts[] = $builderFactory ->method('banAll') ->makePublic() ->addStmt($builderFactory->methodCall($builderFactory->var('this'), 'ban', $builderFactory->args([new Node\Expr\Array_([new Node\Scalar\String_('/')])]))) - ->getNode(); + ->getNode() + ; return $node; } diff --git a/src/Rule/v65/ContextMetadataExtensionToStateRector.php b/src/Rule/v65/ContextMetadataExtensionToStateRector.php index 9e67e49..df47127 100644 --- a/src/Rule/v65/ContextMetadataExtensionToStateRector.php +++ b/src/Rule/v65/ContextMetadataExtensionToStateRector.php @@ -15,19 +15,19 @@ class ContextMetadataExtensionToStateRector extends AbstractRector { private const ALLOWED_CONSTS = ['USE_INDEXING_QUEUE', 'DISABLE_INDEXING']; - public function getRuleDefinition(): \Symplify\RuleDocGenerator\ValueObject\RuleDefinition + public function getRuleDefinition(): RuleDefinition { return new RuleDefinition( 'Migrate extension metadata to state rector', [ new CodeSample( <<<'CODE_SAMPLE' -$context->addExtension(EntityIndexerRegistry::USE_INDEXING_QUEUE, new ArrayEntity()); -CODE_SAMPLE + $context->addExtension(EntityIndexerRegistry::USE_INDEXING_QUEUE, new ArrayEntity()); + CODE_SAMPLE , <<<'CODE_SAMPLE' -$context->addState(EntityIndexerRegistry::USE_INDEXING_QUEUE); -CODE_SAMPLE + $context->addState(EntityIndexerRegistry::USE_INDEXING_QUEUE); + CODE_SAMPLE ), ], ); diff --git a/src/Rule/v65/FakerPropertyToMethodCallRector.php b/src/Rule/v65/FakerPropertyToMethodCallRector.php index 6c1d3c4..1b9a5da 100644 --- a/src/Rule/v65/FakerPropertyToMethodCallRector.php +++ b/src/Rule/v65/FakerPropertyToMethodCallRector.php @@ -17,11 +17,11 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition('Move faker property to method call', [ new CodeSample( <<<'PHP' -$this->faker->randomDigit -PHP, + $this->faker->randomDigit + PHP, <<<'PHP' -$this->faker->randomDigit() -PHP + $this->faker->randomDigit() + PHP ), ]); } diff --git a/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php b/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php index 689e537..90e6efc 100644 --- a/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php +++ b/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php @@ -29,29 +29,29 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition('NAME', [ new CodeSample( <<<'CODE_SAMPLE' -class Foo -{ - /** - * @Route("/form/contact", name="frontend.form.contact.send", methods={"POST"}, defaults={"XmlHttpRequest"=true}) - * @Captcha - */ - public function sendContactForm() - { - } -} -CODE_SAMPLE + class Foo + { + /** + * @Route("/form/contact", name="frontend.form.contact.send", methods={"POST"}, defaults={"XmlHttpRequest"=true}) + * @Captcha + */ + public function sendContactForm() + { + } + } + CODE_SAMPLE , <<<'PHP' -class Foo -{ - /** - * @Route("/form/contact", name="frontend.form.contact.send", methods={"POST"}, defaults={"XmlHttpRequest"=true, "_captcha"=true}) - */ - public function sendContactForm(): Response - { - } -} -PHP + class Foo + { + /** + * @Route("/form/contact", name="frontend.form.contact.send", methods={"POST"}, defaults={"XmlHttpRequest"=true, "_captcha"=true}) + */ + public function sendContactForm(): Response + { + } + } + PHP ), ]); } @@ -66,7 +66,6 @@ public function getNodeTypes(): array /** * @param Node\Stmt\ClassMethod|Class_ $node - * @return null */ public function refactor(Node $node) { diff --git a/src/Rule/v65/MigrateLoginRequiredAnnotationToRouteRector.php b/src/Rule/v65/MigrateLoginRequiredAnnotationToRouteRector.php index f95ba1e..1245d93 100644 --- a/src/Rule/v65/MigrateLoginRequiredAnnotationToRouteRector.php +++ b/src/Rule/v65/MigrateLoginRequiredAnnotationToRouteRector.php @@ -24,21 +24,20 @@ public function __construct(PhpDocTagRemover $phpDocTagRemover) $this->phpDocTagRemover = $phpDocTagRemover; } - public function getRuleDefinition(): RuleDefinition { return new RuleDefinition('Migrates Annotations to Route annotation', [ new CodeSample( <<<'CODE_SAMPLE' -@LoginRequired -@Route("/store-api/product", name="store-api.product.search", methods={"GET", "POST"}) -public function myAction() -CODE_SAMPLE + @LoginRequired + @Route("/store-api/product", name="store-api.product.search", methods={"GET", "POST"}) + public function myAction() + CODE_SAMPLE , <<<'CODE_SAMPLE' -@Route("/store-api/product", name="store-api.product.search", methods={"GET", "POST"}, defaults={"_loginRequired"=true}) -public function myAction() -CODE_SAMPLE + @Route("/store-api/product", name="store-api.product.search", methods={"GET", "POST"}, defaults={"_loginRequired"=true}) + public function myAction() + CODE_SAMPLE ), ]); } @@ -53,7 +52,6 @@ public function getNodeTypes(): array /** * @param Node\Stmt\ClassMethod|Class_ $node - * @return null */ public function refactor(Node $node) { diff --git a/src/Rule/v65/MigrateRouteScopeToRouteDefaults.php b/src/Rule/v65/MigrateRouteScopeToRouteDefaults.php index c3a1d2c..e89de34 100644 --- a/src/Rule/v65/MigrateRouteScopeToRouteDefaults.php +++ b/src/Rule/v65/MigrateRouteScopeToRouteDefaults.php @@ -25,27 +25,28 @@ public function __construct(PhpDocTagRemover $phpDocTagRemover) { $this->phpDocTagRemover = $phpDocTagRemover; } + public function getRuleDefinition(): RuleDefinition { return new RuleDefinition('NAME', [ new CodeSample( <<<'CODE_SAMPLE' -/** - * @RouteScope(scopes={"storefront"}) - */ -class Controller -{ -} -CODE_SAMPLE + /** + * @RouteScope(scopes={"storefront"}) + */ + class Controller + { + } + CODE_SAMPLE , <<<'PHP' -/** - * @Route(defaults={"_routeScope"={"storefront"}}) - */ -class Controller -{ -} -PHP + /** + * @Route(defaults={"_routeScope"={"storefront"}}) + */ + class Controller + { + } + PHP ), ]); } @@ -60,7 +61,6 @@ public function getNodeTypes(): array /** * @param Node\Stmt\ClassMethod|Class_ $node - * @return null */ public function refactor(Node $node) { diff --git a/tests/Rector/ClassMethod/AddArgumentToClassWithoutDefaultValueRector/config/configured_rule.php b/tests/Rector/ClassMethod/AddArgumentToClassWithoutDefaultValueRector/config/configured_rule.php index 64c8ee7..783dbc4 100644 --- a/tests/Rector/ClassMethod/AddArgumentToClassWithoutDefaultValueRector/config/configured_rule.php +++ b/tests/Rector/ClassMethod/AddArgumentToClassWithoutDefaultValueRector/config/configured_rule.php @@ -14,6 +14,6 @@ AddArgumentToClassWithoutDefaultRector::class, [ new AddArgumentToClassWithoutDefault('AbstractCaptcha', 'supports', 1, 'captcha', new ArrayType(new StringType(), new StringType())), - ] + ], ); }; diff --git a/tests/Rector/Class_/InterfaceReplacedWithAbstractClassRector/config/configured_rule.php b/tests/Rector/Class_/InterfaceReplacedWithAbstractClassRector/config/configured_rule.php index f863534..ce1038f 100644 --- a/tests/Rector/Class_/InterfaceReplacedWithAbstractClassRector/config/configured_rule.php +++ b/tests/Rector/Class_/InterfaceReplacedWithAbstractClassRector/config/configured_rule.php @@ -12,6 +12,6 @@ InterfaceReplacedWithAbstractClassRector::class, [ new InterfaceReplacedWithAbstractClass('CartFoo', 'AbstractCartFoo'), - ] + ], ); }; diff --git a/tests/Rector/v65/AddBanAllToReverseProxyRector/AddBanAllToReverseProxyRector.php b/tests/Rector/v65/AddBanAllToReverseProxyRector/AddBanAllToReverseProxyRector.php index bf51d3b..6fa873a 100644 --- a/tests/Rector/v65/AddBanAllToReverseProxyRector/AddBanAllToReverseProxyRector.php +++ b/tests/Rector/v65/AddBanAllToReverseProxyRector/AddBanAllToReverseProxyRector.php @@ -6,6 +6,11 @@ use Frosh\Rector\Tests\Rector\AbstractFroshRectorTestCase; +/** + * @internal + * + * @coversNothing + */ final class AddBanAllToReverseProxyRector extends AbstractFroshRectorTestCase { }