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 | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 3 | public function assert($input) |
|
| 22 | { |
||
| 23 | 3 | $validators = $this->getRules(); |
|
| 24 | 3 | $exceptions = $this->validateRules($input); |
|
| 25 | 3 | $numRules = count($validators); |
|
| 26 | 3 | $numExceptions = count($exceptions); |
|
| 27 | 3 | if ($numExceptions !== $numRules - 1) { |
|
| 28 | 2 | throw $this->reportError($input)->setRelated($exceptions); |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | return true; |
|
| 32 | } |
||
| 33 | |||
| 76 |