Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0078 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | 3 | public function normalize($specification, $context): ?CompositeExpression |
|
27 | { |
||
28 | 3 | $children = \array_filter(\array_map( |
|
29 | function($child) use ($context) { |
||
30 | 3 | return $this->normalizer()->normalize($child, $context); |
|
31 | 3 | }, |
|
32 | 3 | $specification->children() |
|
33 | )); |
||
34 | |||
35 | 3 | if (empty($children)) { |
|
36 | return null; |
||
37 | } |
||
38 | |||
39 | 3 | return $context->qb()->expr()->{self::methodFor($specification)}(...$children); |
|
40 | } |
||
50 |