Skip to content

Commit 5d83a78

Browse files
author
Derek Drummond
committed
Switched instanceof to is_a checks to get around scrutinzer errors.
1 parent 5c17c35 commit 5d83a78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Queue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public function ack(array $message)
266266
$id = $message['id'];
267267
}
268268

269-
if (!($id instanceof \MongoDB\BSON\ObjectID)) {
269+
if (!(is_a($id, 'MongoDB\BSON\ObjectID'))) {
270270
throw new \InvalidArgumentException('$message does not have a field "id" that is a ObjectID');
271271
}
272272

@@ -298,7 +298,7 @@ public function ackSend(array $message, array $payload, $earliestGet = 0, $prior
298298
$id = $message['id'];
299299
}
300300

301-
if (!($id instanceof \MongoDB\BSON\ObjectID)) {
301+
if (!(is_a($id, 'MongoDB\BSON\ObjectID'))) {
302302
throw new \InvalidArgumentException('$message does not have a field "id" that is a ObjectID');
303303
}
304304

0 commit comments

Comments
 (0)