1 | <?php |
||
8 | class GuzzleFactory |
||
9 | { |
||
10 | /** |
||
11 | * @param string $baseUri |
||
12 | * |
||
13 | * @return Guzzle |
||
14 | * |
||
15 | * @throws NotSupportedException when Guzzle vendor version is not supported. |
||
16 | */ |
||
17 | public static function createClient($baseUri, $options = []) |
||
32 | |||
33 | /** |
||
34 | * get a mock of right client |
||
35 | * |
||
36 | * @param Response[] $mockedResponseCollection |
||
37 | * @return Guzzle |
||
38 | * @throws \Exception |
||
39 | */ |
||
40 | public static function createClientMock(array $mockedResponseCollection) |
||
61 | |||
62 | /** |
||
63 | * @return int current Guzzle vendor version. |
||
64 | * |
||
65 | * @throws NotSupportedException when Guzzle vendor version is not supported. |
||
66 | */ |
||
67 | public static function detectGuzzleVersion() |
||
83 | |||
84 | /** |
||
85 | * @return bool |
||
86 | */ |
||
87 | private static function supportsGuzzle6() |
||
91 | |||
92 | /** |
||
93 | * @return bool |
||
94 | */ |
||
95 | private static function supportsGuzzle5() |
||
99 | |||
100 | /** |
||
101 | * @return bool |
||
102 | */ |
||
103 | private static function supportsGuzzle3() |
||
107 | } |
||
108 |
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: