public static function isNotification($msg): bool
    {
        return is_object($msg) && !property_exists($msg, 'id') && isset($msg->method);
    }
public static function isNotification($msg): bool
    {
        return is_object($msg) && !property_exists($msg, 'id') && isset($msg->method);
    }
public static function isNotification ( $ msg ) : bool { return is_object ( $ msg ) && ! property_exists ( $ msg , 'id' ) && isset ( $ msg -> method ) ; }
A message is considered a Notification if it has a method but no ID.

@param object $msg A decoded message body
@return bool
A message is considered a Notification if it has a method but no ID .