function getHoistRole() {
        $roles = $this->roles->filter(function ($role) {
            return $role->hoist;
        });
        
        if($roles->count() === 0) {
            return null;
        }
        
        return $roles->reduce(function ($prev, $role) {
            if($prev === null) {
                return $role;
            }
            
            return ($role->comparePositionTo($prev) > 0 ? $role : $prev);
        });
    }
function getHoistRole() {
        $roles = $this->roles->filter(function ($role) {
            return $role->hoist;
        });
        
        if($roles->count() === 0) {
            return null;
        }
        
        return $roles->reduce(function ($prev, $role) {
            if($prev === null) {
                return $role;
            }
            
            return ($role->comparePositionTo($prev) > 0 ? $role : $prev);
        });
    }
function getHoistRole ( ) { $ roles = $ this -> roles -> filter ( function ( $ role ) { return $ role -> hoist ; } ) ; if ( $ roles -> count ( ) === 0 ) { return null ; } return $ roles -> reduce ( function ( $ prev , $ role ) { if ( $ prev === null ) { return $ role ; } return ( $ role -> comparePositionTo ( $ prev ) > 0 ? $ role : $ prev ) ; } ) ; }
Gets the role the member is hoisted with.
@return \CharlotteDunois\Yasmin\Models\Role|null
Gets the role the member is hoisted with .