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 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
38 | 12 | public function assert($input) |
|
39 | { |
||
40 | 12 | if ($this->validate($input)) { |
|
41 | 8 | return true; |
|
42 | } |
||
43 | |||
44 | 4 | $rule = $this->rule; |
|
45 | 4 | if ($rule instanceof AllOf) { |
|
46 | 2 | $rule = $this->absorbAllOf($rule, $input); |
|
47 | } |
||
48 | |||
49 | throw $rule |
||
50 | 4 | ->reportError($input) |
|
51 | 4 | ->setMode(ValidationException::MODE_NEGATIVE); |
|
52 | } |
||
53 | |||
73 |