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