original_string: public function setFieldData($field, $data)
      {
          if (is_array($this->data)) {
              $this->data[$field] = $data;
          } else {
              $this->data->$field = $data;
          }
          return $this;
      }
code: public function setFieldData($field, $data)
      {
          if (is_array($this->data)) {
              $this->data[$field] = $data;
          } else {
              $this->data->$field = $data;
          }
          return $this;
      }
code_tokens: public function setFieldData ( $ field , $ data ) { if ( is_array ( $ this -> data ) ) { $ this -> data [ $ field ] = $ data ; } else { $ this -> data -> $ field = $ data ; } return $ this ; }
docstring: Sets data for validation field
  
  @param string $field The name of field
  @param mixed $data The data of field
  @return $this
docstring_tokens: Sets data for validation field