Skip to content

Commit

Permalink
[Util] Early strtolower() on StaticRectorStrings::isInArrayInsensitiv…
Browse files Browse the repository at this point in the history
…e() (#232)
  • Loading branch information
samsonasik committed Jun 16, 2021
1 parent 5157414 commit 6311c8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Util/StaticRectorStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public static function camelCaseToUnderscore(string $input): string
*/
public static function isInArrayInsensitive(string $checkedItem, array $array): bool
{
$checkedItem = strtolower($checkedItem);
foreach ($array as $singleArray) {
if (strtolower($singleArray) === strtolower($checkedItem)) {
if (strtolower($singleArray) === $checkedItem) {
return true;
}
}
Expand Down

0 comments on commit 6311c8b

Please sign in to comment.