public function sort($sort = null)
    {
        deprecationWarning(
            'BelongToMany::sort() is deprecated. ' .
            'Use setSort()/getSort() instead.'
        );
        if ($sort !== null) {
            $this->setSort($sort);
        }

        return $this->getSort();
    }
public function sort($sort = null)
    {
        deprecationWarning(
            'BelongToMany::sort() is deprecated. ' .
            'Use setSort()/getSort() instead.'
        );
        if ($sort !== null) {
            $this->setSort($sort);
        }

        return $this->getSort();
    }
public function sort ( $ sort = null ) { deprecationWarning ( 'BelongToMany::sort() is deprecated. ' . 'Use setSort()/getSort() instead.' ) ; if ( $ sort !== null ) { $ this -> setSort ( $ sort ) ; } return $ this -> getSort ( ) ; }
Sets the sort order in which target records should be returned.
If no arguments are passed the currently configured value is returned

@deprecated 3.5.0 Use setSort()/getSort() instead.
@param mixed $sort A find() compatible order clause
@return mixed
Sets the sort order in which target records should be returned . If no arguments are passed the currently configured value is returned