1 | <?php |
||
19 | class AdapterFactory extends AbstractFactory |
||
20 | { |
||
21 | /** |
||
22 | * {@inheritDoc} |
||
23 | */ |
||
24 | 2 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) |
|
35 | |||
36 | /** |
||
37 | * {@inheritDoc} |
||
38 | * |
||
39 | * @return ObjectRepository |
||
40 | */ |
||
41 | 1 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
45 | |||
46 | 2 | public function getOptionsClass() : string |
|
50 | } |
||
51 |
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: