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