*/ public const ELIGIBLE = [ self::EMPLOYEE, self::ADMIN, ]; /** * Whatever of a claimed role set this application recognises, in a stable order. * * @param list $claimed * * @return list */ public static function eligibleOnly(array $claimed): array { return array_values(array_filter( self::ELIGIBLE, static fn (string $role): bool => \in_array($role, $claimed, true), )); } }