Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions rules/Php83/Rector/FuncCall/DynamicClassConstFetchRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/Issues/ChangeSwitchTernary/config/configured_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
);