Skip to content

Commit

Permalink
Fix PHP 8.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Jun 13, 2022
1 parent 4fa98f7 commit 813eadc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NPM.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function getTemplates(): array

$filterTemplates = function ($templates) {
// Move 'key' aka 'slug' into the array itself for easy access
$mappedTemplates = Arr::map($templates, fn ($t, $s) => [...$t, 'slug' => $s]);
$mappedTemplates = Arr::map($templates, fn ($t, $s) => array_merge($t, ['slug' => $s]));

return array_filter($mappedTemplates, function ($template) {
if (isset($template['class']) && class_exists($template['class'])) return true;
Expand Down

0 comments on commit 813eadc

Please sign in to comment.