Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
33 | 1 | public function __construct(array $result) |
|
34 | { |
||
35 | 1 | $this->took = (int)array_get($result, 'took'); |
|
36 | 1 | $this->timedOut = (bool)array_get($result, 'timed_out'); |
|
37 | 1 | $this->shards = (array)array_get($result, '_shards'); |
|
38 | 1 | $this->hits = new Collection(array_get($result, 'hits.hits')); |
|
39 | 1 | $this->totalHits = (int)array_get($result, 'hits.total'); |
|
40 | 1 | $this->maxScore = (float)array_get($result, 'hits.max_score'); |
|
41 | 1 | $this->aggregation = array_get($result, 'aggregations', null); |
|
42 | 1 | } |
|
108 |