Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
33 | 3 | public function create(Specification $spec, QueryBuilder $qb) |
|
34 | { |
||
35 | 3 | if (!$spec instanceof Not) { |
|
36 | 1 | throw new \InvalidArgumentException(); |
|
37 | } |
||
38 | |||
39 | 2 | $factory = $this->registry->getFactory($spec->getWrappedSpecification()); |
|
40 | |||
41 | 2 | return $qb->expr()->not( |
|
42 | 2 | $factory->create($spec->getWrappedSpecification(), $qb) |
|
43 | 2 | ); |
|
44 | } |
||
45 | } |
||
46 |