1 | <?php |
||
13 | class SendMetricListenerProvider implements ListenerProviderInterface |
||
14 | { |
||
15 | /** @var MetricService */ |
||
16 | private $metricService; |
||
17 | |||
18 | /** |
||
19 | * SendMetricSubscriber constructor. |
||
20 | * |
||
21 | * @param MetricService $metricService |
||
22 | */ |
||
23 | 3 | public function __construct(MetricService $metricService) |
|
27 | |||
28 | /** |
||
29 | * @param ListenerAcceptorInterface $listenerAcceptor |
||
30 | * |
||
31 | * @return ListenerProviderInterface|void |
||
32 | */ |
||
33 | 3 | public function provideListeners(ListenerAcceptorInterface $listenerAcceptor) |
|
43 | } |
||
44 |
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: