@@ -101,7 +101,7 @@ public function setRedelivered(bool $redelivered): void
101101 $ this ->redelivered = $ redelivered ;
102102 }
103103
104- public function setCorrelationId (string $ correlationId = null ): void
104+ public function setCorrelationId (? string $ correlationId = null ): void
105105 {
106106 $ this ->setHeader ('correlation_id ' , (string ) $ correlationId );
107107 }
@@ -111,7 +111,7 @@ public function getCorrelationId(): ?string
111111 return $ this ->getHeader ('correlation_id ' );
112112 }
113113
114- public function setMessageId (string $ messageId = null ): void
114+ public function setMessageId (? string $ messageId = null ): void
115115 {
116116 $ this ->setHeader ('message_id ' , (string ) $ messageId );
117117 }
@@ -128,12 +128,12 @@ public function getTimestamp(): ?int
128128 return null === $ value ? null : (int ) $ value ;
129129 }
130130
131- public function setTimestamp (int $ timestamp = null ): void
131+ public function setTimestamp (? int $ timestamp = null ): void
132132 {
133133 $ this ->setHeader ('timestamp ' , $ timestamp );
134134 }
135135
136- public function setReplyTo (string $ replyTo = null ): void
136+ public function setReplyTo (? string $ replyTo = null ): void
137137 {
138138 $ this ->setHeader ('reply_to ' , $ replyTo );
139139 }
@@ -155,12 +155,8 @@ public function jsonSerialize(): array
155155 public static function jsonUnserialize (string $ json ): self
156156 {
157157 $ data = json_decode ($ json , true );
158- if (JSON_ERROR_NONE !== json_last_error ()) {
159- throw new \InvalidArgumentException (sprintf (
160- 'The malformed json given. Error %s and message %s ' ,
161- json_last_error (),
162- json_last_error_msg ()
163- ));
158+ if (\JSON_ERROR_NONE !== json_last_error ()) {
159+ throw new \InvalidArgumentException (sprintf ('The malformed json given. Error %s and message %s ' , json_last_error (), json_last_error_msg ()));
164160 }
165161
166162 return new self ($ data ['body ' ], $ data ['properties ' ], $ data ['headers ' ]);
@@ -171,7 +167,7 @@ public function getJob(): ?\GearmanJob
171167 return $ this ->job ;
172168 }
173169
174- public function setJob (\GearmanJob $ job = null ): void
170+ public function setJob (? \GearmanJob $ job = null ): void
175171 {
176172 $ this ->job = $ job ;
177173 }
0 commit comments