src/ResponseTrait.php
public function setErrorMessage($message)
    {
        switch (gettype($message)) {
            case 'string':
                $this->errorMessage = trim($message);
                break;
            case 'array':
                $this->errorMessage = empty($message) ? '' : $message;
                break;
            default:
                $this->errorMessage = '';
                break;
        }

        return $this;
    }
public function setErrorMessage($message)
    {
        switch (gettype($message)) {
            case 'string':
                $this->errorMessage = trim($message);
                break;
            case 'array':
                $this->errorMessage = empty($message) ? '' : $message;
                break;
            default:
                $this->errorMessage = '';
                break;
        }

        return $this;
    }
public function setErrorMessage ( $ message ) { switch ( gettype ( $ message ) ) { case 'string' : $ this -> errorMessage = trim ( $ message ) ; break ; case 'array' : $ this -> errorMessage = empty ( $ message ) ? '' : $ message ; break ; default : $ this -> errorMessage = '' ; break ; } return $ this ; }
Sets the error message

@param string|array $message
@return self
Sets the error message