Conditions | 4 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 10 |
Ratio | 100 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
32 | 33 | public function apply($instance, stdClass $schema, Context $context, Walker $walker) |
|
33 | { |
||
34 | 33 | if ($schema->exclusiveMaximum === false) { |
|
35 | 24 | if ($instance > $schema->maximum) { |
|
36 | 9 | $context->addViolation('should be lesser than or equal to %s', [$schema->maximum]); |
|
37 | 9 | } |
|
38 | 33 | } elseif ($instance >= $schema->maximum) { |
|
39 | 4 | $context->addViolation('should be lesser than %s', [$schema->maximum]); |
|
40 | 4 | } |
|
41 | 33 | } |
|
42 | } |
||
43 |