protected function isMessage($message)
    {
        if (is_array($message)) {
            foreach ($message as $element) {
                if (!is_subclass_of($element, AbstractMessage::class)) {
                    return false;
                }
            }

            return true;
        }

        return is_subclass_of($message, AbstractMessage::class);
    }
protected function isMessage($message)
    {
        if (is_array($message)) {
            foreach ($message as $element) {
                if (!is_subclass_of($element, AbstractMessage::class)) {
                    return false;
                }
            }

            return true;
        }

        return is_subclass_of($message, AbstractMessage::class);
    }
protected function isMessage ( $ message ) { if ( is_array ( $ message ) ) { foreach ( $ message as $ element ) { if ( ! is_subclass_of ( $ element , AbstractMessage :: class ) ) { return false ; } } return true ; } return is_subclass_of ( $ message , AbstractMessage :: class ) ; }
Whether response is message.

@param mixed $message

@return bool
Whether response is message .