@@ -103,7 +103,7 @@ public function setRedelivered(bool $redelivered): void
103103 $ this ->redelivered = $ redelivered ;
104104 }
105105
106- public function setCorrelationId (string $ correlationId = null ): void
106+ public function setCorrelationId (? string $ correlationId = null ): void
107107 {
108108 $ this ->setHeader ('correlation_id ' , (string ) $ correlationId );
109109 }
@@ -113,7 +113,7 @@ public function getCorrelationId(): ?string
113113 return $ this ->getHeader ('correlation_id ' );
114114 }
115115
116- public function setMessageId (string $ messageId = null ): void
116+ public function setMessageId (? string $ messageId = null ): void
117117 {
118118 $ this ->setHeader ('message_id ' , (string ) $ messageId );
119119 }
@@ -130,12 +130,12 @@ public function getTimestamp(): ?int
130130 return null === $ value ? null : (int ) $ value ;
131131 }
132132
133- public function setTimestamp (int $ timestamp = null ): void
133+ public function setTimestamp (? int $ timestamp = null ): void
134134 {
135135 $ this ->setHeader ('timestamp ' , $ timestamp );
136136 }
137137
138- public function setReplyTo (string $ replyTo = null ): void
138+ public function setReplyTo (? string $ replyTo = null ): void
139139 {
140140 $ this ->setHeader ('reply_to ' , $ replyTo );
141141 }
@@ -187,12 +187,8 @@ public function jsonSerialize(): array
187187 public static function jsonUnserialize (string $ json ): self
188188 {
189189 $ data = json_decode ($ json , true );
190- if (JSON_ERROR_NONE !== json_last_error ()) {
191- throw new \InvalidArgumentException (sprintf (
192- 'The malformed json given. Error %s and message %s ' ,
193- json_last_error (),
194- json_last_error_msg ()
195- ));
190+ if (\JSON_ERROR_NONE !== json_last_error ()) {
191+ throw new \InvalidArgumentException (sprintf ('The malformed json given. Error %s and message %s ' , json_last_error (), json_last_error_msg ()));
196192 }
197193
198194 return new self ($ data ['body ' ], $ data ['properties ' ], $ data ['headers ' ]);
@@ -203,7 +199,7 @@ public function getJob(): ?Job
203199 return $ this ->job ;
204200 }
205201
206- public function setJob (Job $ job = null ): void
202+ public function setJob (? Job $ job = null ): void
207203 {
208204 $ this ->job = $ job ;
209205 }
0 commit comments