Skip to content

Commit

Permalink
refactor: Use arrow function syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Oct 19, 2024
1 parent cae7287 commit 7cac8ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/models/BaseTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public function render(): Markup
*/
public function filterEmptyAttributes(array $attrs): array
{
return array_filter($attrs, static function($value, $key) {
// Keep certain attributes even if they are empty
return in_array($key, self::ALLOWED_EMPTY_ATTRS, true) || !empty($value);
}, ARRAY_FILTER_USE_BOTH);
// Keep certain attributes even if they are empty
return array_filter($attrs, static fn($value, $key) => in_array($key, self::ALLOWED_EMPTY_ATTRS, true) || !empty($value), ARRAY_FILTER_USE_BOTH);
}
}

0 comments on commit 7cac8ff

Please sign in to comment.