Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 11 |
Ratio | 100 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
15 | 2 | View Code Duplication | public static function createFromResponse(ResponseInterface $response): array |
16 | { |
||
17 | 2 | $categories = []; |
|
18 | 2 | $data = json_decode($response->getBody()->getContents(), true); |
|
19 | |||
20 | 2 | foreach ($data as $category) { |
|
21 | 1 | $categories[] = self::createFromArray($category); |
|
22 | } |
||
23 | |||
24 | 2 | return $categories; |
|
25 | } |
||
26 | |||
50 |