We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 0 |
1 | <?php |
||
40 | 4 | public function assert($input): void |
|
41 | { |
||
42 | 4 | if ($this->validate($input)) { |
|
43 | return; |
||
44 | } |
||
45 | |||
46 | 4 | $rule = $this->rule; |
|
47 | 4 | if ($rule instanceof AllOf) { |
|
48 | 2 | $rule = $this->absorbAllOf($rule, $input); |
|
49 | } |
||
50 | |||
51 | 4 | $exception = $rule->reportError($input); |
|
52 | 4 | $exception->updateMode(ValidationException::MODE_NEGATIVE); |
|
53 | |||
54 | 4 | throw $exception; |
|
55 | } |
||
76 |