From 8855261365e2acf207cf01c1f40511da3b88e065 Mon Sep 17 00:00:00 2001 From: Pierre PLAZANET Date: Tue, 29 Oct 2019 11:20:31 +0100 Subject: [PATCH] refactor: add rector rules --- .circleci/config.yml | 6 ++++-- composer.json | 19 ++++++++++++++++--- rector.yaml | 13 +++++++++++++ .../CS/Fixer/RuleSetFactorySpec.php | 2 +- .../AbstractOrderedClassElementsFixer.php | 2 +- .../LineBreakBetweenMethodArgumentsFixer.php | 2 +- .../LineBreakBetweenStatementsFixer.php | 2 +- .../Comment/CommentLineToPhpdocBlockFixer.php | 2 +- .../CS/Fixer/Comment/UselessCommentFixer.php | 14 ++++++-------- src/PedroTroller/CS/Fixer/TokenSignatures.php | 4 ++-- tests/Runner.php | 2 +- tests/TokensAnalyzerIntegration/InSwitch.php | 2 +- .../MethodArguments.php | 2 +- .../SizeOfTheLine.php | 2 +- tests/UseCase/ForbiddenFunctions.php | 2 +- tests/UseCase/LineBreakBetweenMethods.php | 2 +- .../Regression/Case1.php | 2 +- .../Regression/Case2.php | 2 +- .../Regression/Case3.php | 2 +- ...eBreakBetweenMethodsWithNoReformatting.php | 2 +- ...etweenMethodsWithNoSplitOnNumberOfArgs.php | 2 +- tests/UseCase/LineBreakBetweenStatements.php | 2 +- tests/UseCase/OrderedSpecElements.php | 2 +- .../OrderedSpecElements/Regression/Case1.php | 2 +- .../OrderedWithGetterAndSetterFirst.php | 2 +- .../Regression/Case1.php | 2 +- .../Regression/Case2.php | 2 +- tests/UseCase/Phpspec.php | 4 ++-- tests/UseCase/PhpspecScenarioScope.php | 4 ++-- tests/UseCase/UselessCodeAfterReturn.php | 2 +- tests/UseCase/UselessComment.php | 2 +- tests/UseCase/UselessComment/Php71.php | 2 +- .../Regression/DoubleLineBreak.php | 2 +- 33 files changed, 71 insertions(+), 45 deletions(-) create mode 100644 rector.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index 23e90f5..4454edd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,13 +15,15 @@ tests: &tests run: | composer test -vvv bin/doc - vendor/bin/php-cs-fixer fix --diff || (echo "Coding standards are not respected. Run 'vendor/bin/php-cs-fixer fix'" && exit 1) + composer run rector || (echo "Coding standards are not respected. Run 'composer run rector'" && exit 1) + composer run php-cs-fixer || (echo "Coding standards are not respected. Run 'composer run php-cs-fixer'" && exit 1) tests_with_future_mode: &tests_with_future_mode run: | PHP_CS_FIXER_FUTURE_MODE=1 composer test -vvv bin/doc - vendor/bin/php-cs-fixer fix --diff || (echo "Coding standards are not respected. Run 'vendor/bin/php-cs-fixer fix'" && exit 1) + composer run rector || (echo "Coding standards are not respected. Run 'composer run rector'" && exit 1) + composer run php-cs-fixer || (echo "Coding standards are not respected. Run 'composer run php-cs-fixer'" && exit 1) jobs: php 7.1: diff --git a/composer.json b/composer.json index f276411..8e5f5ec 100644 --- a/composer.json +++ b/composer.json @@ -8,15 +8,19 @@ }, "require-dev": { "phpspec/phpspec": "^5.1.0", + "rector/rector": "^0.5.19", "twig/twig": "^2.11.3", "webmozart/assert": "^1.3.0" }, "autoload": { - "psr-4": { "PedroTroller\\CS\\": "src/PedroTroller/CS/" } + "psr-4": { + "PedroTroller\\CS\\Fixer\\": "src/PedroTroller/CS/Fixer" + } }, "autoload-dev": { "psr-4": { - "tests\\": "tests/" + "spec\\": "spec", + "tests\\": "tests" } }, "config": { @@ -33,8 +37,17 @@ "tests": [ "tests\\Runner::run", "tests\\Orchestra::run", - "phpspec run -fpretty", + "phpspec run -fpretty" + ], + "rector": [ + "rector process src/ tests/ spec/" + ], + "php-cs-fixer": [ "php-cs-fixer fix --dry-run -vvv --diff" + ], + "lint": [ + "@rector", + "@php-cs-fixer" ] } } diff --git a/rector.yaml b/rector.yaml new file mode 100644 index 0000000..ec34ee5 --- /dev/null +++ b/rector.yaml @@ -0,0 +1,13 @@ +--- +parameters: + auto_import_names: true + + exclude_rectors: + - Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector + +imports: + - resource: vendor/rector/rector/config/set/code-quality/* + - resource: vendor/rector/rector/config/set/php/php71.yaml + - resource: vendor/rector/rector/config/set/phpspec/* + - resource: vendor/rector/rector/config/set/psr-4/* + - resource: vendor/rector/rector/config/set/solid/* diff --git a/spec/PedroTroller/CS/Fixer/RuleSetFactorySpec.php b/spec/PedroTroller/CS/Fixer/RuleSetFactorySpec.php index 3627294..9796fa4 100644 --- a/spec/PedroTroller/CS/Fixer/RuleSetFactorySpec.php +++ b/spec/PedroTroller/CS/Fixer/RuleSetFactorySpec.php @@ -8,7 +8,7 @@ use PedroTroller\CS\Fixer\RuleSetFactory; use PhpSpec\ObjectBehavior; -class RuleSetFactorySpec extends ObjectBehavior +final class RuleSetFactorySpec extends ObjectBehavior { function it_is_initializable() { diff --git a/src/PedroTroller/CS/Fixer/AbstractOrderedClassElementsFixer.php b/src/PedroTroller/CS/Fixer/AbstractOrderedClassElementsFixer.php index 1a94eeb..4ab3fb1 100644 --- a/src/PedroTroller/CS/Fixer/AbstractOrderedClassElementsFixer.php +++ b/src/PedroTroller/CS/Fixer/AbstractOrderedClassElementsFixer.php @@ -23,7 +23,7 @@ protected function applyFix(SplFileInfo $file, Tokens $tokens): void $i = $tokens->getNextTokenOfKind($i, ['{']); $elements = $this->getElements($tokens, $i); - if (!$elements) { + if ($elements === []) { continue; } diff --git a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php index a49db2f..2036100 100644 --- a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php +++ b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php @@ -17,7 +17,7 @@ final class LineBreakBetweenMethodArgumentsFixer extends AbstractFixer implements ConfigurationDefinitionFixerInterface, WhitespacesAwareFixerInterface { - const T_TYPEHINT_SEMI_COLON = 10025; + private const T_TYPEHINT_SEMI_COLON = 10025; /** * {@inheritdoc} diff --git a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenStatementsFixer.php b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenStatementsFixer.php index 495bd27..c26e64d 100644 --- a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenStatementsFixer.php +++ b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenStatementsFixer.php @@ -127,7 +127,7 @@ private function fixSpaces($index, Tokens $tokens): void return; } - if (false === \in_array($tokens[$nextMeaningful]->getId(), array_keys($this->handlers), true)) { + if (false === \array_key_exists($tokens[$nextMeaningful]->getId(), $this->handlers)) { return; } diff --git a/src/PedroTroller/CS/Fixer/Comment/CommentLineToPhpdocBlockFixer.php b/src/PedroTroller/CS/Fixer/Comment/CommentLineToPhpdocBlockFixer.php index b268772..83e1e5c 100644 --- a/src/PedroTroller/CS/Fixer/Comment/CommentLineToPhpdocBlockFixer.php +++ b/src/PedroTroller/CS/Fixer/Comment/CommentLineToPhpdocBlockFixer.php @@ -111,7 +111,7 @@ protected function applyFix(SplFileInfo $file, Tokens $tokens): void $whitespaceIndex = null; do { - $previous = $previous - 1; + --$previous; if ($tokens[$previous]->isComment()) { $comments = array_merge( diff --git a/src/PedroTroller/CS/Fixer/Comment/UselessCommentFixer.php b/src/PedroTroller/CS/Fixer/Comment/UselessCommentFixer.php index 222b61d..ca657d9 100644 --- a/src/PedroTroller/CS/Fixer/Comment/UselessCommentFixer.php +++ b/src/PedroTroller/CS/Fixer/Comment/UselessCommentFixer.php @@ -175,15 +175,13 @@ private function getUselessComments($index, Tokens $tokens) foreach ($arguments as $argument) { if (null === $argument['type']) { $useless[] = sprintf('/^@param +\%s/', $argument['name']); + } elseif ($argument['nullable']) { + $useless[] = sprintf('/^@param +%s\|null +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); + $useless[] = sprintf('/^@param +null\|%s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); + $useless[] = sprintf('/^@param +%s \| null +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); + $useless[] = sprintf('/^@param +null \| %s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); } else { - if ($argument['nullable']) { - $useless[] = sprintf('/^@param +%s\|null +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); - $useless[] = sprintf('/^@param +null\|%s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); - $useless[] = sprintf('/^@param +%s \| null +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); - $useless[] = sprintf('/^@param +null \| %s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); - } else { - $useless[] = sprintf('/^@param +%s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); - } + $useless[] = sprintf('/^@param +%s +\%s$/', str_replace('\\', '\\\\', $argument['type']), $argument['name']); } } diff --git a/src/PedroTroller/CS/Fixer/TokenSignatures.php b/src/PedroTroller/CS/Fixer/TokenSignatures.php index 57b5d19..06ad2b6 100644 --- a/src/PedroTroller/CS/Fixer/TokenSignatures.php +++ b/src/PedroTroller/CS/Fixer/TokenSignatures.php @@ -6,8 +6,8 @@ final class TokenSignatures { - const TYPINT_OPTIONAL = 10022; - const TYPINT_DOUBLE_DOTS = 10025; + public const TYPINT_OPTIONAL = 10022; + public const TYPINT_DOUBLE_DOTS = 10025; public function __construct() { diff --git a/tests/Runner.php b/tests/Runner.php index 429c189..5160176 100644 --- a/tests/Runner.php +++ b/tests/Runner.php @@ -11,7 +11,7 @@ use SplFileInfo; use Symfony\Component\Finder\Finder; -class Runner +final class Runner { public static function run(): void { diff --git a/tests/TokensAnalyzerIntegration/InSwitch.php b/tests/TokensAnalyzerIntegration/InSwitch.php index bb9cfc2..408c848 100644 --- a/tests/TokensAnalyzerIntegration/InSwitch.php +++ b/tests/TokensAnalyzerIntegration/InSwitch.php @@ -9,7 +9,7 @@ use tests\TokensAnalyzerIntegration; use Webmozart\Assert\Assert; -class InSwitch extends TokensAnalyzerIntegration +final class InSwitch extends TokensAnalyzerIntegration { /** * {@inheritdoc} diff --git a/tests/TokensAnalyzerIntegration/MethodArguments.php b/tests/TokensAnalyzerIntegration/MethodArguments.php index e1b1bd1..173420c 100644 --- a/tests/TokensAnalyzerIntegration/MethodArguments.php +++ b/tests/TokensAnalyzerIntegration/MethodArguments.php @@ -9,7 +9,7 @@ use tests\TokensAnalyzerIntegration; use Webmozart\Assert\Assert; -class MethodArguments extends TokensAnalyzerIntegration +final class MethodArguments extends TokensAnalyzerIntegration { /** * {@inheritdoc} diff --git a/tests/TokensAnalyzerIntegration/SizeOfTheLine.php b/tests/TokensAnalyzerIntegration/SizeOfTheLine.php index 975d84c..a06337b 100644 --- a/tests/TokensAnalyzerIntegration/SizeOfTheLine.php +++ b/tests/TokensAnalyzerIntegration/SizeOfTheLine.php @@ -9,7 +9,7 @@ use tests\TokensAnalyzerIntegration; use Webmozart\Assert\Assert; -class SizeOfTheLine extends TokensAnalyzerIntegration +final class SizeOfTheLine extends TokensAnalyzerIntegration { /** * {@inheritdoc} diff --git a/tests/UseCase/ForbiddenFunctions.php b/tests/UseCase/ForbiddenFunctions.php index 6bb0e49..0d0b8d1 100644 --- a/tests/UseCase/ForbiddenFunctions.php +++ b/tests/UseCase/ForbiddenFunctions.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\ForbiddenFunctionsFixer; use tests\UseCase; -class ForbiddenFunctions implements UseCase +final class ForbiddenFunctions implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethods.php b/tests/UseCase/LineBreakBetweenMethods.php index f18f829..f375caa 100644 --- a/tests/UseCase/LineBreakBetweenMethods.php +++ b/tests/UseCase/LineBreakBetweenMethods.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class LineBreakBetweenMethods implements UseCase +final class LineBreakBetweenMethods implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethods/Regression/Case1.php b/tests/UseCase/LineBreakBetweenMethods/Regression/Case1.php index bf2211d..8c552e3 100644 --- a/tests/UseCase/LineBreakBetweenMethods/Regression/Case1.php +++ b/tests/UseCase/LineBreakBetweenMethods/Regression/Case1.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class Case1 implements UseCase +final class Case1 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethods/Regression/Case2.php b/tests/UseCase/LineBreakBetweenMethods/Regression/Case2.php index 26d227a..445c597 100644 --- a/tests/UseCase/LineBreakBetweenMethods/Regression/Case2.php +++ b/tests/UseCase/LineBreakBetweenMethods/Regression/Case2.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class Case2 implements UseCase +final class Case2 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethods/Regression/Case3.php b/tests/UseCase/LineBreakBetweenMethods/Regression/Case3.php index 39f657e..97b4f5d 100644 --- a/tests/UseCase/LineBreakBetweenMethods/Regression/Case3.php +++ b/tests/UseCase/LineBreakBetweenMethods/Regression/Case3.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class Case3 implements UseCase +final class Case3 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethodsWithNoReformatting.php b/tests/UseCase/LineBreakBetweenMethodsWithNoReformatting.php index 86b4716..b75ed09 100644 --- a/tests/UseCase/LineBreakBetweenMethodsWithNoReformatting.php +++ b/tests/UseCase/LineBreakBetweenMethodsWithNoReformatting.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class LineBreakBetweenMethodsWithNoReformatting implements UseCase +final class LineBreakBetweenMethodsWithNoReformatting implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs.php b/tests/UseCase/LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs.php index b35194a..91027f5 100644 --- a/tests/UseCase/LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs.php +++ b/tests/UseCase/LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use tests\UseCase; -class LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs implements UseCase +final class LineBreakBetweenMethodsWithNoSplitOnNumberOfArgs implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/LineBreakBetweenStatements.php b/tests/UseCase/LineBreakBetweenStatements.php index 859a8b7..adbc870 100644 --- a/tests/UseCase/LineBreakBetweenStatements.php +++ b/tests/UseCase/LineBreakBetweenStatements.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenStatementsFixer; use tests\UseCase; -class LineBreakBetweenStatements implements UseCase +final class LineBreakBetweenStatements implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/OrderedSpecElements.php b/tests/UseCase/OrderedSpecElements.php index 91a02e7..2a19064 100644 --- a/tests/UseCase/OrderedSpecElements.php +++ b/tests/UseCase/OrderedSpecElements.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\Phpspec\OrderedSpecElementsFixer; use tests\UseCase; -class OrderedSpecElements implements UseCase +final class OrderedSpecElements implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/OrderedSpecElements/Regression/Case1.php b/tests/UseCase/OrderedSpecElements/Regression/Case1.php index ec24ace..479cc82 100644 --- a/tests/UseCase/OrderedSpecElements/Regression/Case1.php +++ b/tests/UseCase/OrderedSpecElements/Regression/Case1.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\Phpspec\OrderedSpecElementsFixer; use tests\UseCase; -class Case1 implements UseCase +final class Case1 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/OrderedWithGetterAndSetterFirst.php b/tests/UseCase/OrderedWithGetterAndSetterFirst.php index 5e571c1..bca9df1 100644 --- a/tests/UseCase/OrderedWithGetterAndSetterFirst.php +++ b/tests/UseCase/OrderedWithGetterAndSetterFirst.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\ClassNotation\OrderedWithGetterAndSetterFirstFixer; use tests\UseCase; -class OrderedWithGetterAndSetterFirst implements UseCase +final class OrderedWithGetterAndSetterFirst implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case1.php b/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case1.php index 7d22e57..c7d153a 100644 --- a/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case1.php +++ b/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case1.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\ClassNotation\OrderedWithGetterAndSetterFirstFixer; use tests\UseCase; -class Case1 implements UseCase +final class Case1 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case2.php b/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case2.php index 36eebbf..85c5b2c 100644 --- a/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case2.php +++ b/tests/UseCase/OrderedWithGetterAndSetterFirst/Regression/Case2.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\ClassNotation\OrderedWithGetterAndSetterFirstFixer; use tests\UseCase; -class Case2 implements UseCase +final class Case2 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/Phpspec.php b/tests/UseCase/Phpspec.php index 7f5e8a0..cd102b1 100644 --- a/tests/UseCase/Phpspec.php +++ b/tests/UseCase/Phpspec.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace tests\Usecase; +namespace tests\UseCase; use PedroTroller\CS\Fixer\PhpspecFixer; use tests\UseCase; -class Phpspec implements UseCase +final class Phpspec implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/PhpspecScenarioScope.php b/tests/UseCase/PhpspecScenarioScope.php index 127d80c..220332a 100644 --- a/tests/UseCase/PhpspecScenarioScope.php +++ b/tests/UseCase/PhpspecScenarioScope.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace tests\Usecase; +namespace tests\UseCase; use PedroTroller\CS\Fixer\Phpspec\PhpspecScenarioScopeFixer; use tests\UseCase; -class PhpspecScenarioScope implements UseCase +final class PhpspecScenarioScope implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/UselessCodeAfterReturn.php b/tests/UseCase/UselessCodeAfterReturn.php index dd36b1f..b71a32e 100644 --- a/tests/UseCase/UselessCodeAfterReturn.php +++ b/tests/UseCase/UselessCodeAfterReturn.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\DeadCode\UselessCodeAfterReturnFixer; use tests\UseCase; -class UselessCodeAfterReturn implements UseCase +final class UselessCodeAfterReturn implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/UselessComment.php b/tests/UseCase/UselessComment.php index 0cb9d7e..9d07d5a 100644 --- a/tests/UseCase/UselessComment.php +++ b/tests/UseCase/UselessComment.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\Comment\UselessCommentFixer; use tests\UseCase; -class UselessComment implements UseCase +final class UselessComment implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/UselessComment/Php71.php b/tests/UseCase/UselessComment/Php71.php index 32a23cf..3eeeaa5 100644 --- a/tests/UseCase/UselessComment/Php71.php +++ b/tests/UseCase/UselessComment/Php71.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\Comment\UselessCommentFixer; use tests\UseCase; -class Php71 implements UseCase +final class Php71 implements UseCase { /** * {@inheritdoc} diff --git a/tests/UseCase/UselessComment/Regression/DoubleLineBreak.php b/tests/UseCase/UselessComment/Regression/DoubleLineBreak.php index 04afc13..cc86462 100644 --- a/tests/UseCase/UselessComment/Regression/DoubleLineBreak.php +++ b/tests/UseCase/UselessComment/Regression/DoubleLineBreak.php @@ -7,7 +7,7 @@ use PedroTroller\CS\Fixer\Comment\UselessCommentFixer; use tests\UseCase; -class DoubleLineBreak implements UseCase +final class DoubleLineBreak implements UseCase { /** * {@inheritdoc}