original_string: public function setValue(Model $model)
      {
          if ($this->relation) {
              if (!$relationValue = $model->{$this->relation}) {
                  return $this;
              }
  
              $this->value = $relationValue;
          } else {
              $this->value = $model->getAttribute($this->name);
          }
  
          return $this;
      }
code: public function setValue(Model $model)
      {
          if ($this->relation) {
              if (!$relationValue = $model->{$this->relation}) {
                  return $this;
              }
  
              $this->value = $relationValue;
          } else {
              $this->value = $model->getAttribute($this->name);
          }
  
          return $this;
      }
code_tokens: public function setValue ( Model $ model ) { if ( $ this -> relation ) { if ( ! $ relationValue = $ model -> { $ this -> relation } ) { return $ this ; } $ this -> value = $ relationValue ; } else { $ this -> value = $ model -> getAttribute ( $ this -> name ) ; } return $ this ; }
docstring: Set value for this field.
  
  @param Model $model
  
  @return $this
docstring_tokens: Set value for this field .