1 | <?php |
||
14 | class AdapterChainServiceFactory implements FactoryInterface |
||
15 | { |
||
16 | public function __invoke(ContainerInterface $serviceLocator, $requestedName, array $options = null) |
||
37 | |||
38 | /** |
||
39 | * @var ModuleOptions |
||
40 | */ |
||
41 | protected $options; |
||
42 | |||
43 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
47 | |||
48 | |||
49 | /** |
||
50 | * set options |
||
51 | * |
||
52 | * @param ModuleOptions $options |
||
53 | * @return AdapterChainServiceFactory |
||
54 | */ |
||
55 | public function setOptions(ModuleOptions $options) |
||
60 | |||
61 | /** |
||
62 | * get options |
||
63 | * |
||
64 | * @param ServiceLocatorInterface $serviceLocator (optional) Service Locator |
||
65 | * @return ModuleOptions $options |
||
66 | * @throws OptionsNotFoundException If options tried to retrieve without being set but no SL was provided |
||
67 | */ |
||
68 | public function getOptions(ServiceLocatorInterface $serviceLocator = null) |
||
83 | } |
||
84 |
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: