| 1 | <?php |
||
| 17 | class TerminateListener |
||
| 18 | { |
||
| 19 | private $container; |
||
| 20 | private $indexes; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param Container $container |
||
| 24 | * @param IndexService[] $indexes |
||
| 25 | */ |
||
| 26 | public function __construct(Container $container, array $indexes) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Forces commit to the elasticsearch on kernel terminate event |
||
| 34 | */ |
||
| 35 | public function onKernelTerminate() |
||
| 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: