Role/RoleUtil.php
public static function formatRole($role, $force = false)
    {
        if ($force || version_compare(Kernel::VERSION, '4.3', '<')) {
            $role = !$role instanceof Role ? new Role((string) $role) : $role;
        }

        return $role;
    }
public static function formatRole($role, $force = false)
    {
        if ($force || version_compare(Kernel::VERSION, '4.3', '<')) {
            $role = !$role instanceof Role ? new Role((string) $role) : $role;
        }

        return $role;
    }
public static function formatRole ( $ role , $ force = false ) { if ( $ force || version_compare ( Kernel :: VERSION , '4.3' , '<' ) ) { $ role = ! $ role instanceof Role ? new Role ( ( string ) $ role ) : $ role ; } return $ role ; }
Format the role.

@param Role|string $role  The role
@param bool        $force Force to convert the role name

@return Role|string
Format the role .