| 1 | <?php |
||
| 14 | class LoggableProducer implements ProducerInterface |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var LoggerInterface |
||
| 19 | */ |
||
| 20 | private $logger; |
||
| 21 | /** |
||
| 22 | * @var ProducerInterface |
||
| 23 | */ |
||
| 24 | private $producer; |
||
| 25 | |||
| 26 | public function __construct(LoggerInterface $logger, ProducerInterface $producer) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param mixed $payload |
||
| 34 | * |
||
| 35 | * @todo: maybe add properties array as second parameter |
||
| 36 | * @throws ProducerNotProperlyConfigured if queue nor exchange not given. |
||
| 37 | */ |
||
| 38 | public function produce($payload) |
||
| 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: