| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function parseResponse($response): array |
||
| 16 | { |
||
| 17 | // Parse predictions |
||
| 18 | foreach ($response['predictions'] as $res) { |
||
| 19 | $this->results[] = array_fill_keys( |
||
| 20 | ['id', 'text'], |
||
| 21 | (new ZipFromPlaceIdAction($this->query, $res['place_id']))->execute() |
||
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | return [ |
||
| 26 | 'total_count' => count($this->results), |
||
| 27 | 'items' => $this->results, |
||
| 28 | ]; |
||
| 31 |