original_string: public function getFieldData($field)
      {
          // $this->data could only be array or object, which has been checked by $this->setData
          if ((is_array($this->data) && array_key_exists($field, $this->data))
              || ($this->data instanceof \ArrayAccess && $this->data->offsetExists($field))
          ) {
              return $this->data[$field];
          } elseif (isset($this->data->$field)) {
              return $this->data->$field;
          } elseif (method_exists($this->data, 'get' . $field)) {
              return $this->data->{'get' . $field}();
          } else {
              return null;
          }
      }
code: public function getFieldData($field)
      {
          // $this->data could only be array or object, which has been checked by $this->setData
          if ((is_array($this->data) && array_key_exists($field, $this->data))
              || ($this->data instanceof \ArrayAccess && $this->data->offsetExists($field))
          ) {
              return $this->data[$field];
          } elseif (isset($this->data->$field)) {
              return $this->data->$field;
          } elseif (method_exists($this->data, 'get' . $field)) {
              return $this->data->{'get' . $field}();
          } else {
              return null;
          }
      }
code_tokens: public function getFieldData ( $ field ) { // $this->data could only be array or object, which has been checked by $this->setData if ( ( is_array ( $ this -> data ) && array_key_exists ( $ field , $ this -> data ) ) || ( $ this -> data instanceof \ ArrayAccess && $ this -> data -> offsetExists ( $ field ) ) ) { return $ this -> data [ $ field ] ; } elseif ( isset ( $ this -> data -> $ field ) ) { return $ this -> data -> $ field ; } elseif ( method_exists ( $ this -> data , 'get' . $ field ) ) { return $ this -> data -> { 'get' . $ field } ( ) ; } else { return null ; } }
docstring: Returns validation field data
  
  @param string $field The name of field
  @return mixed
docstring_tokens: Returns validation field data