protected functionmatches($message) : bool {
if (RawMessage::class === $message::class || Message::class === $message::class) {
thrownew\LogicException('Unable to test a message attachment on a RawMessage or Message instance.');
}
return$this->expectedValue === \count($message->getAttachments());
}