original_string: public function setMessage($message)
      {
          $messageVariables = null;
  
          if (is_array($message)) {
              if (array_key_exists('messageVariables', $message)) {
                  $messageVariables = $message['messageVariables'];
              }
  
              if (array_key_exists('message', $message)) {
                  $message = $message['message'];
              } else {
                  $messageVariables = $message;
                  $message          = $this->messageTemplate;
              }
          }
  
          if (!is_string($message)) {
              throw new InvalidArgumentException(
                  sprintf(
                      'Wrong parameters for %s([array|string $message]); %s given.',
                      __METHOD__,
                      is_object($message) ? get_class($message) : gettype($message)
                  ),
                  E_ERROR
              );
          }
  
          $this->message = $this->createMessage($message, $messageVariables);
  
          return $this;
      }
code: public function setMessage($message)
      {
          $messageVariables = null;
  
          if (is_array($message)) {
              if (array_key_exists('messageVariables', $message)) {
                  $messageVariables = $message['messageVariables'];
              }
  
              if (array_key_exists('message', $message)) {
                  $message = $message['message'];
              } else {
                  $messageVariables = $message;
                  $message          = $this->messageTemplate;
              }
          }
  
          if (!is_string($message)) {
              throw new InvalidArgumentException(
                  sprintf(
                      'Wrong parameters for %s([array|string $message]); %s given.',
                      __METHOD__,
                      is_object($message) ? get_class($message) : gettype($message)
                  ),
                  E_ERROR
              );
          }
  
          $this->message = $this->createMessage($message, $messageVariables);
  
          return $this;
      }
code_tokens: public function setMessage ( $ message ) { $ messageVariables = null ; if ( is_array ( $ message ) ) { if ( array_key_exists ( 'messageVariables' , $ message ) ) { $ messageVariables = $ message [ 'messageVariables' ] ; } if ( array_key_exists ( 'message' , $ message ) ) { $ message = $ message [ 'message' ] ; } else { $ messageVariables = $ message ; $ message = $ this -> messageTemplate ; } } if ( ! is_string ( $ message ) ) { throw new InvalidArgumentException ( sprintf ( 'Wrong parameters for %s([array|string $message]); %s given.' , __METHOD__ , is_object ( $ message ) ? get_class ( $ message ) : gettype ( $ message ) ) , E_ERROR ) ; } $ this -> message = $ this -> createMessage ( $ message , $ messageVariables ) ; return $ this ; }
docstring: Sets the Exception generated message.
  
  @param array|string $message
  
  @return static
  @throws InvalidArgumentException
docstring_tokens: Sets the Exception generated message .