We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 6 | public function assert($input) |
|
| 19 | { |
||
| 20 | 6 | $exceptions = $this->validateRules($input); |
|
| 21 | 6 | $numRules = count($this->rules); |
|
| 22 | 6 | $numExceptions = count($exceptions); |
|
| 23 | $summary = [ |
||
| 24 | 6 | 'total' => $numRules, |
|
| 25 | 6 | 'failed' => $numExceptions, |
|
| 26 | 6 | 'passed' => $numRules - $numExceptions, |
|
| 27 | 6 | ]; |
|
| 28 | 6 | if (!empty($exceptions)) { |
|
| 29 | 5 | throw $this->reportError($input, $summary)->setRelated($exceptions); |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | return true; |
|
| 33 | } |
||
| 34 | |||
| 64 |