1 | <?php |
||
8 | class GuzzleFactory |
||
9 | { |
||
10 | /** |
||
11 | * @param string $baseUri |
||
12 | * @param array $options |
||
13 | * @return Version\Guzzle3|Version\Guzzle5|Version\Guzzle6 |
||
14 | */ |
||
15 | public static function createClient($baseUri, $options = []) |
||
30 | |||
31 | /** |
||
32 | * get a mock of right client |
||
33 | * |
||
34 | * @param Response[] $mockedResponseCollection |
||
35 | * @return Guzzle |
||
36 | */ |
||
37 | public static function createClientMock(array $mockedResponseCollection) |
||
55 | |||
56 | /** |
||
57 | * @return int current Guzzle vendor version. |
||
58 | * |
||
59 | * @throws NotSupportedException when Guzzle vendor version is not supported. |
||
60 | */ |
||
61 | public static function detectGuzzleVersion() |
||
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | private static function supportsGuzzle6() |
||
85 | |||
86 | /** |
||
87 | * @return bool |
||
88 | */ |
||
89 | private static function supportsGuzzle5() |
||
93 | |||
94 | /** |
||
95 | * @return bool |
||
96 | */ |
||
97 | private static function supportsGuzzle3() |
||
101 | } |
||
102 |
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: