Skip to content

Commit

Permalink
Specify array_filter callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed May 20, 2024
1 parent 886b3d0 commit 754b7b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Reflection/ConstantNameHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function normalize(string $name): string
return $name;
}

$nameParts = array_filter(explode('\\', $name));
$nameParts = array_filter(explode('\\', $name), static fn ($part) => $part !== '');
return strtolower(implode('\\', array_slice($nameParts, 0, -1))) . '\\' . end($nameParts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static function (Node\Param $param) {
return $param->var->name;
},
$node->getParams(),
));
), static fn ($name) => $name !== false);

foreach ($node->uses as $use) {
if (!is_string($use->var->name)) {
Expand Down

0 comments on commit 754b7b8

Please sign in to comment.