Skip to content

Commit

Permalink
Update GetSetMethodNormalizer.php
Browse files Browse the repository at this point in the history
Fix: Add length check for setter method detection
  • Loading branch information
Pepperoni1337 authored and nicolas-grekas committed Feb 24, 2025
1 parent 6ad986f commit a221b2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Normalizer/GetSetMethodNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ private function isSetMethod(\ReflectionMethod $method): bool
return !$method->isStatic()
&& !$method->getAttributes(Ignore::class)
&& 0 < $method->getNumberOfParameters()
&& 3 < \strlen($method->name)
&& str_starts_with($method->name, 'set')
&& !ctype_lower($method->name[3])
;
Expand Down

0 comments on commit a221b2f

Please sign in to comment.