| 1 | <?php |
||
| 8 | class QueueMiddleware implements Middleware |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Queue |
||
| 12 | */ |
||
| 13 | private $queue; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | private $queue_map; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param Queue $queue |
||
| 22 | * @param array $queue_map |
||
| 23 | */ |
||
| 24 | 5 | public function __construct(Queue $queue, array $queue_map = []) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritdoc |
||
| 32 | */ |
||
| 33 | 3 | public function execute($command, callable $next) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Gets the specific queue for the command |
||
| 54 | * |
||
| 55 | * @param string $command_name |
||
| 56 | * |
||
| 57 | * @return string |
||
| 58 | * |
||
| 59 | * @throws \Exception If the command isn't assigned to a pipe |
||
| 60 | */ |
||
| 61 | 3 | private function getQueue($command_name) |
|
| 73 | } |
||
| 74 |
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: