| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.3332 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 28 | 2 | public function getProductGroupsWithProducts($extId, $token) |
|
| 29 | { |
||
| 30 | 2 | $response = $this->fetchDocument( |
|
| 31 | 2 | '/v4/installations/' . $extId . '/product-groups?with=products', |
|
| 32 | 2 | $token, |
|
| 33 | 'listGroupsWithProducts' |
||
| 34 | 2 | ); |
|
| 35 | |||
| 36 | 2 | foreach($response as &$group) { |
|
| 37 | foreach($group['products'] as &$product) { |
||
| 38 | $product = ProductEntity::make($product); |
||
| 39 | } |
||
| 40 | $group = GroupEntity::make($group); |
||
| 41 | 2 | } |
|
| 42 | |||
| 43 | 2 | return $response; |
|
| 44 | } |
||
| 45 | |||
| 64 |