Skip to content

[CLEANUP] Avoid magic method forwarding in RuleSet #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2025
Merged

Conversation

oliverklee
Copy link
Collaborator

Part of #1147

@coveralls
Copy link

coveralls commented Mar 12, 2025

Coverage Status

coverage: 55.591% (-0.06%) from 55.65%
when pulling af71971 on cleanup/magic/ruleset
into 831f3d9 on main.

Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a local variable for the next level formatter?

Comment on lines 281 to 292
$renderedRule = $nextLevelFormat->getFormatter()
->safely(static function () use ($rule, $nextLevelFormat): string {
return $rule->render($nextLevelFormat);
});
if ($renderedRule === null) {
continue;
}
if ($isFirst) {
$isFirst = false;
$result .= $nextLevelFormat->spaceBeforeRules();
$result .= $nextLevelFormat->getFormatter()->spaceBeforeRules();
} else {
$result .= $nextLevelFormat->spaceBetweenRules();
$result .= $nextLevelFormat->getFormatter()->spaceBetweenRules();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a local variable for the next level formatter?

@oliverklee oliverklee force-pushed the cleanup/magic/ruleset branch from 3dcd027 to fdb27f9 Compare March 12, 2025 17:26
@oliverklee oliverklee requested a review from JakeQZ March 12, 2025 17:26
@oliverklee oliverklee force-pushed the cleanup/magic/ruleset branch from fdb27f9 to af71971 Compare March 12, 2025 17:27
@JakeQZ JakeQZ merged commit fdd1a65 into main Mar 12, 2025
21 checks passed
@JakeQZ JakeQZ deleted the cleanup/magic/ruleset branch March 12, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants