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