1 | <?php |
||
14 | class ConnectionFactory extends AbstractFactory |
||
15 | { |
||
16 | /** |
||
17 | * Get the class name of the options associated with this factory. |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | 3 | public function getOptionsClass() |
|
25 | |||
26 | /** |
||
27 | * @param ContainerInterface $container |
||
28 | * @param string $requestedName |
||
29 | * @param array|null $options |
||
30 | * |
||
31 | * @throws \RuntimeException |
||
32 | * @throws \InvalidArgumentException |
||
33 | * |
||
34 | * @return ClientImpl |
||
35 | */ |
||
36 | 3 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
43 | |||
44 | /** |
||
45 | * Create service. |
||
46 | * |
||
47 | * @param ServiceLocatorInterface $serviceLocator |
||
48 | * |
||
49 | * @return ClientImpl |
||
50 | */ |
||
51 | 1 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
55 | |||
56 | /** |
||
57 | * @param ConnectionOptions $options |
||
58 | * |
||
59 | * @throws InvalidArgumentException |
||
60 | * |
||
61 | * @return ClientImpl |
||
62 | */ |
||
63 | 3 | protected function createConnection(ConnectionOptions $options) |
|
89 | } |
||
90 |
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: