1 | <?php |
||
15 | class ClientFactory |
||
16 | { |
||
17 | protected $namespaces = []; |
||
18 | protected $metadata = []; |
||
19 | /** |
||
20 | * @var SerializerInterface |
||
21 | */ |
||
22 | protected $serializer; |
||
23 | /** |
||
24 | * @var MessageFactory |
||
25 | */ |
||
26 | protected $messageFactory; |
||
27 | |||
28 | /** |
||
29 | * @var HttpClient |
||
30 | */ |
||
31 | protected $httpClient; |
||
32 | |||
33 | /** |
||
34 | * @var PhpMetadataGeneratorInterface |
||
35 | */ |
||
36 | private $generator; |
||
37 | |||
38 | private $unwrap = false; |
||
39 | 16 | ||
40 | /** |
||
41 | 16 | * @var HeaderHandler |
|
42 | */ |
||
43 | 16 | private $headerHandler; |
|
44 | 16 | ||
45 | 16 | public function __construct(array $namespaces, SerializerInterface $serializer) |
|
53 | 12 | ||
54 | public function setHeaderHandler(HeaderHandler $headerHandler) |
||
58 | |||
59 | public function setUnwrapResponses($unwrap) |
||
63 | |||
64 | public function setHttpClient(HttpClient $client) |
||
68 | 16 | ||
69 | 16 | /** |
|
70 | * @param MessageFactory $messageFactory |
||
71 | 16 | */ |
|
72 | public function setMessageFactory(MessageFactory $messageFactory) |
||
76 | 16 | ||
77 | public function setSerializer(SerializerInterface $serializer) |
||
81 | 16 | ||
82 | 16 | public function setMetadataGenerator(PhpMetadataGeneratorInterface $generator) |
|
86 | |||
87 | 16 | private function getSoapService($wsdl, $portName = null, $serviceName = null) |
|
100 | |||
101 | public function addNamespace($uri, $phpNs) |
||
105 | |||
106 | 14 | /** |
|
107 | 14 | * @param string $wsdl |
|
108 | 14 | * @param null|string $portName |
|
109 | * @param null|string $serviceName |
||
110 | 14 | * @param null|bool $unwrap |
|
111 | * @return Client |
||
112 | */ |
||
113 | public function getClient($wsdl, $portName = null, $serviceName = null, $unwrap = null) |
||
124 | |||
125 | /** |
||
126 | 15 | * @param $serviceName |
|
127 | * @param array $services |
||
128 | * @return array |
||
129 | * @throws ServiceNotFoundException |
||
130 | */ |
||
131 | private function getService($serviceName, array $services) |
||
141 | 2 | ||
142 | /** |
||
143 | 13 | * @param string $portName |
|
144 | * @param array $service |
||
145 | * @return array |
||
146 | * @throws PortNotFoundException |
||
147 | */ |
||
148 | private function getPort($portName, array $service) |
||
158 | } |
||
159 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.