original_string: public function field($fieldName, $fieldValue = '', $fieldBoost = null) {
          if(empty($fieldName)) {
              throw new \InvalidArgumentException('Please provide a fieldname');
          }
          $field = array(
  			'name'=> $fieldName,
  			'value' => $fieldValue
          );
          if(!empty($fieldBoost)) {
              $field['boost'] = $fieldBoost;
          }
          $this->fields[] = $field;
          return $this;
      }
code: public function field($fieldName, $fieldValue = '', $fieldBoost = null) {
          if(empty($fieldName)) {
              throw new \InvalidArgumentException('Please provide a fieldname');
          }
          $field = array(
  			'name'=> $fieldName,
  			'value' => $fieldValue
          );
          if(!empty($fieldBoost)) {
              $field['boost'] = $fieldBoost;
          }
          $this->fields[] = $field;
          return $this;
      }
code_tokens: public function field ( $ fieldName , $ fieldValue = '' , $ fieldBoost = null ) { if ( empty ( $ fieldName ) ) { throw new \ InvalidArgumentException ( 'Please provide a fieldname' ) ; } $ field = array ( 'name' => $ fieldName , 'value' => $ fieldValue ) ; if ( ! empty ( $ fieldBoost ) ) { $ field [ 'boost' ] = $ fieldBoost ; } $ this -> fields [ ] = $ field ; return $ this ; }
docstring: Add a 'field' entry for this document
  @param String $fieldName
  @param String $fieldValue
  @param int $fieldBoost
  @throws \InvalidArgumentException
docstring_tokens: Add a field entry for this document