@@ -220,6 +220,7 @@ class InvalidMessage implements Message
220
220
{
221
221
public function getBody (): string
222
222
{
223
+ throw new \BadMethodCallException ('This should not be called directly ' );
223
224
}
224
225
225
226
public function setBody (string $ body ): void
@@ -232,6 +233,7 @@ public function setProperties(array $properties): void
232
233
233
234
public function getProperties (): array
234
235
{
236
+ throw new \BadMethodCallException ('This should not be called directly ' );
235
237
}
236
238
237
239
public function setProperty (string $ name , $ value ): void
@@ -248,6 +250,7 @@ public function setHeaders(array $headers): void
248
250
249
251
public function getHeaders (): array
250
252
{
253
+ throw new \BadMethodCallException ('This should not be called directly ' );
251
254
}
252
255
253
256
public function setHeader (string $ name , $ value ): void
@@ -264,6 +267,7 @@ public function setRedelivered(bool $redelivered): void
264
267
265
268
public function isRedelivered (): bool
266
269
{
270
+ throw new \BadMethodCallException ('This should not be called directly ' );
267
271
}
268
272
269
273
public function setCorrelationId (string $ correlationId = null ): void
@@ -272,6 +276,7 @@ public function setCorrelationId(string $correlationId = null): void
272
276
273
277
public function getCorrelationId (): ?string
274
278
{
279
+ throw new \BadMethodCallException ('This should not be called directly ' );
275
280
}
276
281
277
282
public function setMessageId (string $ messageId = null ): void
@@ -280,10 +285,12 @@ public function setMessageId(string $messageId = null): void
280
285
281
286
public function getMessageId (): ?string
282
287
{
288
+ throw new \BadMethodCallException ('This should not be called directly ' );
283
289
}
284
290
285
291
public function getTimestamp (): ?int
286
292
{
293
+ throw new \BadMethodCallException ('This should not be called directly ' );
287
294
}
288
295
289
296
public function setTimestamp (int $ timestamp = null ): void
@@ -296,5 +303,6 @@ public function setReplyTo(string $replyTo = null): void
296
303
297
304
public function getReplyTo (): ?string
298
305
{
306
+ throw new \BadMethodCallException ('This should not be called directly ' );
299
307
}
300
308
}
0 commit comments