original_string: private function appendSort(QueryBuilder $builder, array $sort)
      {
          if (!empty($sort)) {
              $builder->sort($sort);
          }
          return $this;
      }
code: private function appendSort(QueryBuilder $builder, array $sort)
      {
          if (!empty($sort)) {
              $builder->sort($sort);
          }
          return $this;
      }
code_tokens: private function appendSort ( QueryBuilder $ builder , array $ sort ) { if ( ! empty ( $ sort ) ) { $ builder -> sort ( $ sort ) ; } return $ this ; }
docstring: Appends sorting criteria to a Query Builder.
  
  @param   QueryBuilder    $builder
  @param   array           $sort
  @return  self
docstring_tokens: Appends sorting criteria to a Query Builder .