src/Phlack.php
private function toParameters($message)
    {
        if (is_string($message)) {
            return $this->getMessageBuilder()->setText($message)->create()->jsonSerialize();
        } elseif (is_array($message)) {
            return $message;
        } elseif ($message instanceof JsonSerializable) {
            return $message->jsonSerialize();
        }

        throw new UnexpectedTypeException($message, ['string', 'array', 'JsonSerializable']);
    }
private function toParameters($message)
    {
        if (is_string($message)) {
            return $this->getMessageBuilder()->setText($message)->create()->jsonSerialize();
        } elseif (is_array($message)) {
            return $message;
        } elseif ($message instanceof JsonSerializable) {
            return $message->jsonSerialize();
        }

        throw new UnexpectedTypeException($message, ['string', 'array', 'JsonSerializable']);
    }
@param mixed $message

@throws UnexpectedTypeException

@return array