1 | <?php |
||
11 | class ProfileClient implements HttpClient, HttpAsyncClient |
||
12 | { |
||
13 | /** |
||
14 | * @var HttpClient|HttpAsyncClient $client |
||
15 | */ |
||
16 | private $client; |
||
17 | |||
18 | /** |
||
19 | * @var Collector |
||
20 | */ |
||
21 | private $collector; |
||
22 | |||
23 | /** |
||
24 | * @param HttpClient|HttpAsyncClient $client |
||
25 | * @param Collector $collector |
||
26 | */ |
||
27 | 1 | public function __construct($client, Collector $collector) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function sendAsyncRequest(RequestInterface $request) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function sendRequest(RequestInterface $request) |
||
58 | |||
59 | /** |
||
60 | * @param RequestInterface $request |
||
61 | */ |
||
62 | private function collectRequestInformations(RequestInterface $request) |
||
72 | } |
||
73 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: