Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 2 | public function compile(QueryBuilder $queryBuilder): string |
|
19 | { |
||
20 | 2 | $output = ''; |
|
21 | /** |
||
22 | * @var string $key |
||
23 | * @var object|array<mixed>|scalar $value |
||
24 | */ |
||
25 | 2 | foreach ($this->expression as $key => $value) { |
|
26 | 2 | $value = $queryBuilder->normalizeArgument($value); |
|
27 | 2 | if ($output != '') { |
|
28 | 2 | $output .= ','; |
|
29 | } |
||
30 | 2 | $output .= '"' . $key . '":' . $value->compile($queryBuilder); |
|
31 | } |
||
32 | |||
33 | 2 | return '{' . $output . '}'; |
|
34 | } |
||
36 |