| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 9 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 14 | View Code Duplication | public function apply($instance, stdClass $schema, Context $context, Walker $walker) |
| 59 | { |
||
| 60 | 14 | $altContext = $context->duplicate(); |
|
| 61 | 14 | $walker->applyConstraints($instance, $schema->not, $altContext); |
|
| 62 | |||
| 63 | 14 | if ($altContext->countViolations() === $context->countViolations()) { |
|
| 64 | 6 | $context->addViolation('should not match schema in "not"'); |
|
| 65 | 6 | } |
|
| 66 | 14 | } |
|
| 67 | } |
||
| 68 |