Normalizes and sorts an array for comparison.
Description
Maps each element through normalizeValue() and sorts the result, ensuring consistent comparison regardless of element order or AbstractEnum instance identity.
Parameters
$items<span class="WordPressAiClientProvidersModelsDTOarray”>WordPressAiClientProvidersModelsDTOarrayrequired- The array to normalize.
Source
private static function normalizeArrayForComparison(array $items): array
{
$normalized = array_map([self::class, 'normalizeValue'], $items);
sort($normalized);
return $normalized;
}
Changelog
| Version | Description |
|---|---|
| 1.2.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.