<?php
namespace Tiamr\Utils;

if (!defined('ABSPATH')) {
    exit;
}

final class Roles {
    public static function get_all_roles(): array {
        $roles = wp_roles()->roles;

        uasort($roles, static function ($a, $b) {
            return strcasecmp(translate_user_role($a['name']), translate_user_role($b['name']));
        });

        return $roles;
    }
}
