diff --git a/ecs.php b/ecs.php index bf9046f..410eea1 100644 --- a/ecs.php +++ b/ecs.php @@ -20,6 +20,7 @@ $parameters->set( Option::PATHS, [ + __DIR__ . '/bin', __DIR__ . '/config', __DIR__ . '/fixed', __DIR__ . '/src', diff --git a/rector.php b/rector.php index 0f17c10..76d05b8 100644 --- a/rector.php +++ b/rector.php @@ -35,6 +35,7 @@ $parameters->set( Option::PATHS, [ + __DIR__ . '/bin', __DIR__ . '/config', __DIR__ . '/fixed', __DIR__ . '/src', diff --git a/src/PHPCodeSnifferRuleSetGenerator.php b/src/PHPCodeSnifferRuleSetGenerator.php index 229f71b..3af3e3c 100644 --- a/src/PHPCodeSnifferRuleSetGenerator.php +++ b/src/PHPCodeSnifferRuleSetGenerator.php @@ -30,11 +30,11 @@ final class PHPCodeSnifferRuleSetGenerator /** * @var \Zing\CodingStandard\Printers\RuleSetPrinter */ - private $printer; + private $ruleSetPrinter; public function __construct(RuleSetPrinter $printer) { - $this->printer = $printer; + $this->ruleSetPrinter = $printer; } public function generate(): void @@ -50,7 +50,7 @@ public function generate(): void file_put_contents( sprintf(__DIR__ . '/../config/set/php_codesniffer/%s', self::MAP[$setDefinition->getRelativePath()]), - $this->printer->print($this->formatRulesToServices($ruleset)) + $this->ruleSetPrinter->print($this->formatRulesToServices($ruleset)) ); } } diff --git a/src/PhpCsFixerRuleSetGenerator.php b/src/PhpCsFixerRuleSetGenerator.php index 5d88941..2be6167 100644 --- a/src/PhpCsFixerRuleSetGenerator.php +++ b/src/PhpCsFixerRuleSetGenerator.php @@ -60,11 +60,11 @@ final class PhpCsFixerRuleSetGenerator /** * @var \Zing\CodingStandard\Printers\RuleSetPrinter */ - private $printer; + private $ruleSetPrinter; public function __construct(RuleSetPrinter $printer) { - $this->printer = $printer; + $this->ruleSetPrinter = $printer; } public function generate(): void @@ -74,7 +74,7 @@ public function generate(): void $fixerFactory->registerBuiltInFixers(); file_put_contents( sprintf(__DIR__ . '/../config/set/php-cs-fixer/%s', self::MAP[$setDefinition->getName()]), - $this->printer->print($this->formatRulesToServices($fixerFactory, $setDefinition)) + $this->ruleSetPrinter->print($this->formatRulesToServices($fixerFactory, $setDefinition)) ); } } diff --git a/src/Printers/PHPCodeSnifferRuleSetPrinter.php b/src/Printers/PHPCodeSnifferRuleSetPrinter.php index 03509c3..b01dfea 100644 --- a/src/Printers/PHPCodeSnifferRuleSetPrinter.php +++ b/src/Printers/PHPCodeSnifferRuleSetPrinter.php @@ -6,7 +6,7 @@ use PhpParser\Node\Expr; -class PHPCodeSnifferRuleSetPrinter extends RuleSetPrinter +final class PHPCodeSnifferRuleSetPrinter extends RuleSetPrinter { public function configureService(Expr $expr, array $configuration): Expr { diff --git a/src/Printers/PhpCsFixerRuleSetPrinter.php b/src/Printers/PhpCsFixerRuleSetPrinter.php index 7bc3f4b..30337e0 100644 --- a/src/Printers/PhpCsFixerRuleSetPrinter.php +++ b/src/Printers/PhpCsFixerRuleSetPrinter.php @@ -6,7 +6,7 @@ use PhpParser\Node\Expr; -class PhpCsFixerRuleSetPrinter extends RuleSetPrinter +final class PhpCsFixerRuleSetPrinter extends RuleSetPrinter { public function configureService(Expr $expr, array $configuration): Expr {