Skip to content

Commit

Permalink
Expand array map shorthand due to Psalm not understanding it
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 19, 2024
1 parent 396b83d commit 3ae5df0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected static function buildFileExtensionPattern(array $extensions): string
{
// Normalize array by splitting any CSV strings within
$extensions = array_merge(...array_map(function (string $item): array {
return array_map('trim', explode(',', $item));
return array_map(fn (string $item): string => trim($item), explode(',', $item));
}, $extensions));

// Remove leading dots, escape extensions, and build the regex pattern
Expand Down

0 comments on commit 3ae5df0

Please sign in to comment.