1 | <?php |
||
13 | class Client { |
||
14 | /** |
||
15 | * @var HttpClient |
||
16 | */ |
||
17 | private $client; |
||
18 | |||
19 | /** |
||
20 | * @param HttpClient $client |
||
21 | */ |
||
22 | 6 | public function __construct(HttpClient $client = null) { |
|
25 | 6 | ||
26 | 6 | /** |
|
27 | * @param string $url |
||
28 | * @param SimpleXMLElement $body |
||
29 | * |
||
30 | * @return SimpleXMLElement |
||
31 | */ |
||
32 | public function post($url, SimpleXMLElement $body) { |
||
42 | |||
43 | /** |
||
44 | * @param string $url |
||
45 | * |
||
46 | * @return SimpleXMLElement |
||
47 | */ |
||
48 | 1 | public function get($url) { |
|
57 | } |
||
58 |
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: