SupportedOption::normalizeArrayForComparison( WordPressAiClientProvidersModelsDTOarray $items ): WordPressAiClientProvidersModelsDTOarray<mixed>

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

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.

Return

WordPressAiClientProvidersModelsDTOarray<mixed> The normalized, sorted array.

Source

private static function normalizeArrayForComparison(array $items): array
{
    $normalized = array_map([self::class, 'normalizeValue'], $items);
    sort($normalized);
    return $normalized;
}

Changelog

VersionDescription
1.2.1Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.