Skip to content

Commit

Permalink
Use anonymous functions
Browse files Browse the repository at this point in the history
  • Loading branch information
codepuncher committed Jun 19, 2024
1 parent 3cc35cd commit 49381f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public static function camelToKebab(string $string): string

public static function sanitizeHtmlClasses(array $classes): string
{
return implode(' ', array_map(function ($class): string {
return sanitize_html_class((string) $class);
}, $classes));
return implode(
' ',
array_map(fn ($class): string => sanitize_html_class((string) $class), $classes),
);
}
}

0 comments on commit 49381f6

Please sign in to comment.