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

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

        return $role instanceof Role ? $role->getRole() : (string) $role;
    }
public static function formatName ( $ role ) : string { if ( $ role instanceof RoleInterface ) { return $ role -> getName ( ) ; } return $ role instanceof Role ? $ role -> getRole ( ) : ( string ) $ role ; }
Format the role name.

@param Role|RoleInterface|string $role The role

@return string
Format the role name .