Skip to content

Commit 9c4c73e

Browse files
Remove bool typehint for php < 7 supports
1 parent c0c8da9 commit 9c4c73e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/enqueue/Consumption/QueueConsumer.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,17 @@ public function consume(ExtensionInterface $runtimeExtension = null)
347347
/**
348348
* @param bool $enableSubscriptionConsumer
349349
*/
350-
public function enableSubscriptionConsumer(bool $enableSubscriptionConsumer)
350+
public function enableSubscriptionConsumer($enableSubscriptionConsumer)
351351
{
352+
if (!is_bool($enableSubscriptionConsumer) {
353+
throw new InvalidArgumentException(
354+
sprintf(
355+
'The argument must be a boolean but got %s.',
356+
is_object($argument) ? get_class($argument) : gettype($argument)
357+
)
358+
);
359+
}
360+
352361
$this->enableSubscriptionConsumer = $enableSubscriptionConsumer;
353362
}
354363

0 commit comments

Comments
 (0)