| Conditions | 4 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | private function handlerRequest(string $url): stdClass |
||
| 42 | { |
||
| 43 | try { |
||
| 44 | $response = $this->strategy->sendRequest($url); |
||
|
|
|||
| 45 | |||
| 46 | $code = $response->getStatus(); |
||
| 47 | if ($code !== 200) { |
||
| 48 | throw new HttpException(""); |
||
| 49 | } |
||
| 50 | |||
| 51 | $response = json_decode($response->getBody()); |
||
| 52 | |||
| 53 | if (!$response->success) { |
||
| 54 | throw new HttpException(""); |
||
| 55 | } |
||
| 56 | } catch (Throwable $throwable) { |
||
| 57 | throw new HttpException($throwable->getMessage()); |
||
| 58 | } |
||
| 59 | |||
| 60 | return $response; |
||
| 61 | } |
||
| 63 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.