1 | <?php |
||
16 | final class HttpClientComponent extends BaseObject |
||
17 | { |
||
18 | /** |
||
19 | * Options to pass to yii\httpclient\Client; |
||
20 | * @var string $clientOptions |
||
21 | */ |
||
22 | public $clientOptions; |
||
23 | |||
24 | /** |
||
25 | * HttpOptions |
||
26 | * @var array $options |
||
27 | */ |
||
28 | public $options; |
||
29 | |||
30 | /** |
||
31 | * The HTTP client |
||
32 | * @var Client $client |
||
33 | */ |
||
34 | private $client; |
||
35 | |||
36 | /** |
||
37 | * Returns the client instance |
||
38 | * @return Client |
||
39 | */ |
||
40 | public function getClient() |
||
44 | |||
45 | /** |
||
46 | * Initializes the HttpClient with a transport and a given set of options, and pre-loads events |
||
47 | * @return void |
||
48 | */ |
||
49 | public function init() |
||
70 | } |
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: