| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | abstract class QueryResponse implements ResponseInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var array<mixed> |
||
| 10 | */ |
||
| 11 | protected array $response; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param array<mixed> $response |
||
| 15 | */ |
||
| 16 | 31 | public function __construct(array $response) |
|
| 17 | { |
||
| 18 | 31 | $this->response = $response; |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Return the raw response as we have received it from druid. |
||
| 23 | * |
||
| 24 | * @return array<mixed> |
||
| 25 | */ |
||
| 26 | 11 | public function raw(): array |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Return the data in a "normalized" way, so we can easily iterate over it |
||
| 33 | * |
||
| 34 | * @return array<array<mixed>> |
||
| 35 | */ |
||
| 36 | abstract public function data(): array; |
||
| 37 | } |