static function decodeMessage(string $data) {
        try {
            $message = \unserialize(\base64_decode(\rtrim($data, static::END_BUFFER)));
            if(!($message instanceof \CharlotteDunois\Phoebe\Message)) {
                throw new \Exception('');
            }
            
            return $message;
        } catch (\Throwable $e) {
            throw new \InvalidArgumentException('Invalid phoebe message');
        }
    }
static function decodeMessage(string $data) {
        try {
            $message = \unserialize(\base64_decode(\rtrim($data, static::END_BUFFER)));
            if(!($message instanceof \CharlotteDunois\Phoebe\Message)) {
                throw new \Exception('');
            }
            
            return $message;
        } catch (\Throwable $e) {
            throw new \InvalidArgumentException('Invalid phoebe message');
        }
    }
static function decodeMessage ( string $ data ) { try { $ message = \ unserialize ( \ base64_decode ( \ rtrim ( $ data , static :: END_BUFFER ) ) ) ; if ( ! ( $ message instanceof \ CharlotteDunois \ Phoebe \ Message ) ) { throw new \ Exception ( '' ) ; } return $ message ; } catch ( \ Throwable $ e ) { throw new \ InvalidArgumentException ( 'Invalid phoebe message' ) ; } }
Decodes a message.
@param string  $data
@return \CharlotteDunois\Phoebe\Message
@throws \InvalidArgumentException
Decodes a message .