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