| Conditions | 2 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0625 |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | try { |
||
| 56 | 6 | $response = $this->httpClient->get($url); |
|
| 57 | 3 | $jsonResponse = (string)$response->getBody(); |
|
| 58 | 3 | $jsonObject = json_decode($jsonResponse); |
|
| 59 | |||
| 60 | 3 | return Week::fromJson($jsonObject); |
|
| 61 | 3 | } catch (RequestException $requestException) { |
|
| 62 | 3 | throw new NetworkingException(); |
|
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.