| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 3 | public function handle($source, string $path): Traversable |
|
| 37 | { |
||
| 38 | 3 | if (!$this->guzzleIsLoaded()) { |
|
| 39 | 1 | throw new LazyJsonException('Guzzle is required to load JSON from endpoints'); |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | $response = (new Client())->get($source, [ |
|
| 43 | 'headers' => [ |
||
| 44 | 2 | 'Accept' => 'application/json', |
|
| 45 | 'Content-Type' => 'application/json', |
||
| 46 | ], |
||
| 47 | ]); |
||
| 48 | |||
| 49 | 2 | return parent::handle($response, $path); |
|
| 50 | } |
||
| 62 |