1 | <?php |
||
6 | class Volumes |
||
7 | { |
||
8 | protected $client; |
||
9 | protected $chunk = false; |
||
10 | |||
11 | public function __construct(GoogleBooks $client) |
||
15 | |||
16 | /** |
||
17 | * @param $query |
||
18 | * @return \Generator|Volume || array |
||
19 | */ |
||
20 | public function search($query) |
||
27 | |||
28 | /** |
||
29 | * @param $query |
||
30 | * @return \Generator|Volume |
||
31 | */ |
||
32 | private function fetchSearch($query) |
||
38 | |||
39 | /** |
||
40 | * @param $chunk |
||
41 | * @return Volumes |
||
42 | */ |
||
43 | public function chunk(int $chunk) |
||
48 | |||
49 | public function firstOrNull($query) |
||
54 | |||
55 | public function get($id) |
||
59 | |||
60 | public function byIsbn($isbn) |
||
66 | } |
||
67 |
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: