From 6f29f5b05721a2331029754787bdb85dc22a1894 Mon Sep 17 00:00:00 2001 From: Alex Boyce Date: Tue, 14 May 2019 09:43:11 -0400 Subject: [PATCH] Sometimes the succesful flag on the message payload is not set, in these situations, successful should be treated as true (#50) (#51) --- src/Bayeux/Message.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bayeux/Message.php b/src/Bayeux/Message.php index 7e29b49..8c97f2f 100644 --- a/src/Bayeux/Message.php +++ b/src/Bayeux/Message.php @@ -93,7 +93,7 @@ class Message * @JMS\Type("bool") * @JMS\Exclude(if="context.getDirection() === 1") */ - private $successful; + private $successful = true; /** * @var bool|null @@ -326,7 +326,7 @@ public function setTimestamp(?\DateTimeImmutable $timestamp): Message /** * @return bool|null */ - public function isSuccessful(): ?bool + public function isSuccessful(): bool { return $this->successful; } @@ -336,7 +336,7 @@ public function isSuccessful(): ?bool * * @return Message */ - public function setSuccessful(?bool $successful): Message + public function setSuccessful(bool $successful): Message { $this->successful = $successful;