original_string: private function appendFields(QueryBuilder $builder, array $fields)
      {
          list($fields, $include) = $this->prepareFields($fields);
          if (!empty($fields)) {
              $method = (true === $include) ? 'select' : 'exclude';
              $builder->$method(array_keys($fields));
          }
          return $this;
      }
code: private function appendFields(QueryBuilder $builder, array $fields)
      {
          list($fields, $include) = $this->prepareFields($fields);
          if (!empty($fields)) {
              $method = (true === $include) ? 'select' : 'exclude';
              $builder->$method(array_keys($fields));
          }
          return $this;
      }
code_tokens: private function appendFields ( QueryBuilder $ builder , array $ fields ) { list ( $ fields , $ include ) = $ this -> prepareFields ( $ fields ) ; if ( ! empty ( $ fields ) ) { $ method = ( true === $ include ) ? 'select' : 'exclude' ; $ builder -> $ method ( array_keys ( $ fields ) ) ; } return $ this ; }
docstring: Appends projection fields to a Query Builder.
  
  @param   QueryBuilder    $builder
  @param   array           $fields
  @return  self
docstring_tokens: Appends projection fields to a Query Builder .