0, self::REGISTERED_PEERS => 1, self::PASSWORD_AUTHENTICATION, self::SESSIONS => 2, }; } /** * Returns an array of cases ordered by their priority. * * @return array The array of cases sorted by their priority. */ public static function casesOrdered(): array { $cases = self::cases(); usort($cases, fn($a, $b) => $a->getPriority() <=> $b->getPriority()); return $cases; } }