original_string: protected function setValue($index, $value)
      {
          if (gettype($value) === 'object') {
              $this->values[$index] = $value;
          } else {
              $class_name = $this->fields[$index];
              $real_class_name = __NAMESPACE__ . "\\" . $class_name;
              $this->values[$index] = new $real_class_name();
              $this->values[$index]->value = $value;
          }
          return $this;
      }
code: protected function setValue($index, $value)
      {
          if (gettype($value) === 'object') {
              $this->values[$index] = $value;
          } else {
              $class_name = $this->fields[$index];
              $real_class_name = __NAMESPACE__ . "\\" . $class_name;
              $this->values[$index] = new $real_class_name();
              $this->values[$index]->value = $value;
          }
          return $this;
      }
code_tokens: protected function setValue ( $ index , $ value ) { if ( gettype ( $ value ) === 'object' ) { $ this -> values [ $ index ] = $ value ; } else { $ class_name = $ this -> fields [ $ index ] ; $ real_class_name = __NAMESPACE__ . "\\" . $ class_name ; $ this -> values [ $ index ] = new $ real_class_name ( ) ; $ this -> values [ $ index ] -> value = $ value ; } return $ this ; }
docstring: Set an value
  @param int - index of the field
  @param Mixed $value
  @return mixed
docstring_tokens: Set an value