function resolve($role) {
        if($role instanceof \CharlotteDunois\Yasmin\Models\Role) {
            return $role;
        }
        
        if(\is_int($role)) {
            $role = (string) $role;
        }
        
        if(\is_string($role) && parent::has($role)) {
            return parent::get($role);
        }
        
        throw new \InvalidArgumentException('Unable to resolve unknown role');
    }
function resolve($role) {
        if($role instanceof \CharlotteDunois\Yasmin\Models\Role) {
            return $role;
        }
        
        if(\is_int($role)) {
            $role = (string) $role;
        }
        
        if(\is_string($role) && parent::has($role)) {
            return parent::get($role);
        }
        
        throw new \InvalidArgumentException('Unable to resolve unknown role');
    }
function resolve ( $ role ) { if ( $ role instanceof \ CharlotteDunois \ Yasmin \ Models \ Role ) { return $ role ; } if ( \ is_int ( $ role ) ) { $ role = ( string ) $ role ; } if ( \ is_string ( $ role ) && parent :: has ( $ role ) ) { return parent :: get ( $ role ) ; } throw new \ InvalidArgumentException ( 'Unable to resolve unknown role' ) ; }
Resolves given data to a Role.
@param \CharlotteDunois\Yasmin\Models\Role|string|int  $role  string/int = role ID
@return \CharlotteDunois\Yasmin\Models\Role
@throws \InvalidArgumentException
Resolves given data to a Role .