Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
45 | 5 | public function toArray(): array |
|
46 | { |
||
47 | 5 | $jsonDocuments = []; |
|
48 | 5 | foreach ($this->predicate as $key => $document) { |
|
49 | 5 | $jsonDocuments[] = json_encode($document); |
|
50 | } |
||
51 | |||
52 | return [ |
||
53 | 5 | TermType::FILTER, |
|
54 | [ |
||
55 | 5 | $this->query->toArray(), |
|
56 | [ |
||
57 | TermType::JSON, |
||
58 | 5 | $jsonDocuments, |
|
59 | ], |
||
60 | ], |
||
61 | ]; |
||
62 | } |
||
63 | } |
||
64 |