diff --git a/src/models/Attributes.php b/src/models/Attributes.php index d331ddf..3e91b30 100644 --- a/src/models/Attributes.php +++ b/src/models/Attributes.php @@ -119,11 +119,7 @@ public function getClasses(): array { $classNames = explode(' ', $classNames); } - return array_unique( - array_filter( - array_map('trim', $classNames) - ) - ); + return self::splitClassNames($classNames); } /** @@ -240,8 +236,8 @@ static private function splitClassNames(array|string|null $classNames): array { return []; } - return array_values(array_filter(array_map('trim', + return array_values(array_unique(array_filter(array_map('trim', is_string($classNames) ? explode(' ', $classNames) : $classNames - ))); + )))); } }