| 1 | <?php |
||
| 7 | class QueueMiddleware implements Middleware |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var Queue |
||
| 11 | */ |
||
| 12 | private $queue; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private $queue_map; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param Queue $queue |
||
| 21 | * @param array $queue_map |
||
| 22 | */ |
||
| 23 | public function __construct(Queue $queue, array $queue_map = []) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public function execute($command, callable $next) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Gets the specific queue for the command |
||
| 53 | * |
||
| 54 | * @param string $command_name |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | * |
||
| 58 | * @throws \Exception If the command isn't assigned to a pipe |
||
| 59 | */ |
||
| 60 | private function getQueue($command_name) |
||
| 72 | } |
||
| 73 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: