| 1 | <?php |
||
| 18 | class StorageFactory extends AbstractFactory |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * {@inheritDoc} |
||
| 22 | */ |
||
| 23 | 3 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritDoc} |
||
| 42 | * |
||
| 43 | * @return ObjectRepository |
||
| 44 | */ |
||
| 45 | 2 | public function createService(ServiceLocatorInterface $container) |
|
| 49 | |||
| 50 | 3 | public function getOptionsClass() : string |
|
| 54 | } |
||
| 55 |
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: