protected function buildMessage($message, $indent = '')
    {
        switch (true) {
            case is_array($message):
                $this->buildArrayMessage($message, $indent);
                break;

            case method_exists($message, '__toString'):
            case is_string($message):
                $this->message = $message . PHP_EOL;
                break;

            default:
                throw new InvalidArgumentException(
                    'Incorrect message type. Must be string, array or object with __toString method.'
                );
                break;
        }

        return $this;
    }