@@ -103,7 +103,7 @@ public function setRedelivered(bool $redelivered): void
103
103
$ this ->redelivered = $ redelivered ;
104
104
}
105
105
106
- public function setCorrelationId (string $ correlationId = null ): void
106
+ public function setCorrelationId (? string $ correlationId = null ): void
107
107
{
108
108
$ this ->setHeader ('correlation_id ' , (string ) $ correlationId );
109
109
}
@@ -113,7 +113,7 @@ public function getCorrelationId(): ?string
113
113
return $ this ->getHeader ('correlation_id ' );
114
114
}
115
115
116
- public function setMessageId (string $ messageId = null ): void
116
+ public function setMessageId (? string $ messageId = null ): void
117
117
{
118
118
$ this ->setHeader ('message_id ' , (string ) $ messageId );
119
119
}
@@ -130,12 +130,12 @@ public function getTimestamp(): ?int
130
130
return null === $ value ? null : (int ) $ value ;
131
131
}
132
132
133
- public function setTimestamp (int $ timestamp = null ): void
133
+ public function setTimestamp (? int $ timestamp = null ): void
134
134
{
135
135
$ this ->setHeader ('timestamp ' , $ timestamp );
136
136
}
137
137
138
- public function setReplyTo (string $ replyTo = null ): void
138
+ public function setReplyTo (? string $ replyTo = null ): void
139
139
{
140
140
$ this ->setHeader ('reply_to ' , $ replyTo );
141
141
}
@@ -187,12 +187,8 @@ public function jsonSerialize(): array
187
187
public static function jsonUnserialize (string $ json ): self
188
188
{
189
189
$ 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 ()));
196
192
}
197
193
198
194
return new self ($ data ['body ' ], $ data ['properties ' ], $ data ['headers ' ]);
@@ -203,7 +199,7 @@ public function getJob(): ?Job
203
199
return $ this ->job ;
204
200
}
205
201
206
- public function setJob (Job $ job = null ): void
202
+ public function setJob (? Job $ job = null ): void
207
203
{
208
204
$ this ->job = $ job ;
209
205
}
0 commit comments