Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
29 | 1 | public function getResult(): array |
|
30 | { |
||
31 | 1 | return array_map( |
|
32 | 1 | function (array $data) { |
|
33 | 1 | $entity = ReflectionSingleton::getInstance($this->entityName)->newInstanceWithoutConstructor(); |
|
34 | 1 | $entityData = array_merge( |
|
35 | 1 | $data['_source'], |
|
36 | [ |
||
37 | 1 | $this->hydrator->getIdName($this->entityName) => $data['_id'], |
|
38 | ] |
||
39 | ); |
||
40 | |||
41 | 1 | $this->hydrator->hydrate($entityData, $entity); |
|
42 | |||
43 | 1 | return $entity; |
|
44 | 1 | }, |
|
45 | 1 | $this->adapter->findBy($this->entityName, $this->body)['hits']['hits'] |
|
46 | ); |
||
47 | } |
||
48 | } |
||
49 |