original_string: public function filter(Query $query)
      {
          if (!empty($this->filterOptions['conditions'])) {
              $query->where($this->filterOptions['conditions']);
          }
          if (!empty($this->filterOptions['order'])) {
              $query->order($this->filterOptions['order']);
          }
  
          return $query;
      }
code: public function filter(Query $query)
      {
          if (!empty($this->filterOptions['conditions'])) {
              $query->where($this->filterOptions['conditions']);
          }
          if (!empty($this->filterOptions['order'])) {
              $query->order($this->filterOptions['order']);
          }
  
          return $query;
      }
code_tokens: public function filter ( Query $ query ) { if ( ! empty ( $ this -> filterOptions [ 'conditions' ] ) ) { $ query -> where ( $ this -> filterOptions [ 'conditions' ] ) ; } if ( ! empty ( $ this -> filterOptions [ 'order' ] ) ) { $ query -> order ( $ this -> filterOptions [ 'order' ] ) ; } return $ query ; }
docstring: Apply filter conditions and order options to the given query.
  
  @param Query $query
  @return Query
docstring_tokens: Apply filter conditions and order options to the given query .