| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 2 | public function handle(string $planId) |
|
| 31 | { |
||
| 32 | 2 | $link = $this->baseUrl.self::FETCH_PLAN_RELATIVE_LINK."?PlanId={$planId}"; |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @var ResponseInterface $response |
||
| 36 | */ |
||
| 37 | 2 | $response = $this->adapter->getHttpClient() |
|
| 38 | 2 | ->get($link); |
|
| 39 | |||
| 40 | 2 | if ($response->getStatusCode() !== 200) { |
|
| 41 | 1 | throw InvalidHttpResponseException::createFromResponse($response); |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | return json_decode($response->getBody(), true); |
|
| 45 | } |
||
| 46 | } |
||
| 47 |