We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 7 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
42 | 3 | public function check($input): void |
|
43 | { |
||
44 | 3 | foreach ($this->getRules() as $v) { |
|
45 | try { |
||
46 | 2 | $v->check($input); |
|
47 | |||
48 | 1 | return; |
|
49 | 2 | } catch (ValidationException $e) { |
|
50 | 2 | if (!isset($firstException)) { |
|
51 | 2 | $firstException = $e; |
|
52 | } |
||
53 | } |
||
54 | } |
||
55 | |||
56 | 2 | if (isset($firstException)) { |
|
57 | 1 | throw $firstException; |
|
58 | } |
||
59 | |||
60 | 1 | throw $this->reportError($input); |
|
61 | } |
||
63 |