Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | public function get() |
||
21 | { |
||
22 | $response = $this->client->get($this->getEndpointUrl(1, true)); |
||
23 | |||
24 | // return new model instance with fetched content if response is okay |
||
25 | if ($response->isOk()) { |
||
26 | return $this->model->newInstance($response->getContent()); |
||
|
|||
27 | } |
||
28 | |||
29 | return $response->getContent(); |
||
30 | } |
||
31 | } |
||
32 |
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: