Skip to content

[CodingStyle] Remove MinMaxToClampRector from coding style level - #8270

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-min-max-clamp-from-coding-style
Aug 2, 2026
Merged

[CodingStyle] Remove MinMaxToClampRector from coding style level#8270
TomasVotruba merged 1 commit into
mainfrom
remove-min-max-clamp-from-coding-style

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

MinMaxToClampRector already lives in the Rector\Php86\Rector\FuncCall namespace and is registered in config/set/php86.php, but it was still listed in the coding style level.

It is a PHP version feature rule (clamp() is new in PHP 8.6, the rule implements MinPhpVersionInterface), not a coding style one. This removes it from CodingStyleLevel so it only ships via the php86 set.

The rule itself is unchanged:

-$value = min(max($value, $min), $max);
+$value = clamp($value, $min, $max);

@TomasVotruba
TomasVotruba merged commit c782801 into main Aug 2, 2026
64 checks passed
@TomasVotruba
TomasVotruba deleted the remove-min-max-clamp-from-coding-style branch August 2, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant