public static function formatName($role): string
    {
        if ($role instanceof RoleInterface) {
            return $role->getName();
        }

        return $role instanceof Role ? $role->getRole() : (string) $role;
    }