private function appendSort(QueryBuilder $builder, array $sort)
    {
        if (!empty($sort)) {
            $builder->sort($sort);
        }
        return $this;
    }
private function appendSort(QueryBuilder $builder, array $sort)
    {
        if (!empty($sort)) {
            $builder->sort($sort);
        }
        return $this;
    }
private function appendSort ( QueryBuilder $ builder , array $ sort ) { if ( ! empty ( $ sort ) ) { $ builder -> sort ( $ sort ) ; } return $ this ; }
Appends sorting criteria to a Query Builder.

@param   QueryBuilder    $builder
@param   array           $sort
@return  self
Appends sorting criteria to a Query Builder .