1 | <?php |
||
13 | trait Fetcher |
||
14 | { |
||
15 | /** |
||
16 | * Configuration for the Guzzle client |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $clientConfig = []; |
||
21 | |||
22 | /** |
||
23 | * Merges configuration arrays and returns the result |
||
24 | * |
||
25 | * @param array $extraConfig |
||
26 | * @return array |
||
27 | */ |
||
28 | private function getClientConfig(array $extraConfig = []) : array |
||
32 | |||
33 | /** |
||
34 | * Fetch a response for a URL using Guzzle client. |
||
35 | * |
||
36 | * @param string $url |
||
37 | * @param array|null $extraConfig Extra configuration |
||
38 | * @return ResponseInterface |
||
39 | */ |
||
40 | public function fetchResponse(string $url, ? array $extraConfig = []) : ? ResponseInterface |
||
46 | } |
||
47 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.