diff --git a/rules/Php83/Rector/FuncCall/DynamicClassConstFetchRector.php b/rules/Php83/Rector/FuncCall/DynamicClassConstFetchRector.php index cb2c6c3b617..d21960dde7b 100644 --- a/rules/Php83/Rector/FuncCall/DynamicClassConstFetchRector.php +++ b/rules/Php83/Rector/FuncCall/DynamicClassConstFetchRector.php @@ -26,18 +26,19 @@ public function getRuleDefinition(): RuleDefinition return new RuleDefinition( 'constant(Example::class . \'::\' . $constName) to dynamic class const fetch Example::{$constName}', [ - new CodeSample( - <<<'CODE_SAMPLE' + new CodeSample( + <<<'CODE_SAMPLE' constant(Example::class . '::' . $constName); CODE_SAMPLE - , - <<<'CODE_SAMPLE' + , + <<<'CODE_SAMPLE' Example::{$constName}; CODE_SAMPLE - , - ), + , + ), - ]); + ] + ); } public function getNodeTypes(): array diff --git a/tests/Issues/ChangeSwitchTernary/config/configured_rule.php b/tests/Issues/ChangeSwitchTernary/config/configured_rule.php index c17e0a448ff..9bfc3eec3ea 100644 --- a/tests/Issues/ChangeSwitchTernary/config/configured_rule.php +++ b/tests/Issues/ChangeSwitchTernary/config/configured_rule.php @@ -8,4 +8,6 @@ use Rector\Tests\Issues\ChangeSwitchTernary\Source\AnotherExpressionRector; return RectorConfig::configure() - ->withRules([ChangeSwitchToMatchRector::class, TernaryFalseExpressionToIfRector::class, AnotherExpressionRector::class]); + ->withRules( + [ChangeSwitchToMatchRector::class, TernaryFalseExpressionToIfRector::class, AnotherExpressionRector::class] + );