@@ -133,6 +133,7 @@ class InvalidMessage implements Message
133
133
{
134
134
public function getBody (): string
135
135
{
136
+ throw new \BadMethodCallException ('This should not be called directly ' );
136
137
}
137
138
138
139
public function setBody (string $ body ): void
@@ -145,6 +146,7 @@ public function setProperties(array $properties): void
145
146
146
147
public function getProperties (): array
147
148
{
149
+ throw new \BadMethodCallException ('This should not be called directly ' );
148
150
}
149
151
150
152
public function setProperty (string $ name , $ value ): void
@@ -161,6 +163,7 @@ public function setHeaders(array $headers): void
161
163
162
164
public function getHeaders (): array
163
165
{
166
+ throw new \BadMethodCallException ('This should not be called directly ' );
164
167
}
165
168
166
169
public function setHeader (string $ name , $ value ): void
@@ -177,6 +180,7 @@ public function setRedelivered(bool $redelivered): void
177
180
178
181
public function isRedelivered (): bool
179
182
{
183
+ throw new \BadMethodCallException ('This should not be called directly ' );
180
184
}
181
185
182
186
public function setCorrelationId (string $ correlationId = null ): void
@@ -185,6 +189,7 @@ public function setCorrelationId(string $correlationId = null): void
185
189
186
190
public function getCorrelationId (): ?string
187
191
{
192
+ throw new \BadMethodCallException ('This should not be called directly ' );
188
193
}
189
194
190
195
public function setMessageId (string $ messageId = null ): void
@@ -193,10 +198,12 @@ public function setMessageId(string $messageId = null): void
193
198
194
199
public function getMessageId (): ?string
195
200
{
201
+ throw new \BadMethodCallException ('This should not be called directly ' );
196
202
}
197
203
198
204
public function getTimestamp (): ?int
199
205
{
206
+ throw new \BadMethodCallException ('This should not be called directly ' );
200
207
}
201
208
202
209
public function setTimestamp (int $ timestamp = null ): void
@@ -209,5 +216,6 @@ public function setReplyTo(string $replyTo = null): void
209
216
210
217
public function getReplyTo (): ?string
211
218
{
219
+ throw new \BadMethodCallException ('This should not be called directly ' );
212
220
}
213
221
}
0 commit comments