original_string: public function addErrorMessage($message, $setToInvalid = true)
      {
          $this->errors[] = $message;
  
          if ($setToInvalid) {
              $this->setValid(false);
          }
  
          return $this;
      }
code: public function addErrorMessage($message, $setToInvalid = true)
      {
          $this->errors[] = $message;
  
          if ($setToInvalid) {
              $this->setValid(false);
          }
  
          return $this;
      }
code_tokens: public function addErrorMessage ( $ message , $ setToInvalid = true ) { $ this -> errors [ ] = $ message ; if ( $ setToInvalid ) { $ this -> setValid ( false ) ; } return $ this ; }
docstring: Add a error message
  
  @param string $message
  @param boolean $setToInvalid
  @return $this
docstring_tokens: Add a error message