public function getAllAvailableRoles($roleHierarchy)
    {
        $roles = [];
        foreach ($roleHierarchy as $key => $value) {
            if (is_array($value)) {
                $roles = array_merge($roles, $this->getAllAvailableRoles($value));
            }
            if (is_string($key)) {
                $roles[] = $key;
            }
            if (is_string($value)) {
                $roles[] = $value;
            }
        }

        return $roles;
    }