| 1 | <?php |
||
| 9 | class AsyncPublisher implements QueuePublisher |
||
| 10 | { |
||
| 11 | /** @var Driver */ |
||
| 12 | private $driver; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | private $exchangeName; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor |
||
| 19 | * |
||
| 20 | * @param Driver $driver |
||
| 21 | * @param string $exchangeName |
||
| 22 | */ |
||
| 23 | public function __construct(Driver $driver, $exchangeName) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Publish a message on the queue |
||
| 31 | * |
||
| 32 | * @param mixed $data |
||
| 33 | * @param string $routingKey |
||
| 34 | * @param string[] $headers |
||
| 35 | * |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function publish($data, $routingKey = '', array $headers = []) |
||
| 44 | } |
||
| 45 |
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: