We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5.1502 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 11 | public function check($input) |
|
| 36 | { |
||
| 37 | 11 | $rules = $this->getRules(); |
|
| 38 | try { |
||
| 39 | 11 | foreach ($rules as $rule) { |
|
| 40 | 11 | $rule->check($input); |
|
| 41 | 9 | } |
|
| 42 | 11 | } catch (ValidationException $exception) { |
|
| 43 | 10 | if (count($rules) == 1 && $this->template) { |
|
| 44 | $exception->setTemplate($this->template); |
||
| 45 | } |
||
| 46 | |||
| 47 | 10 | throw $exception; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | return true; |
|
| 51 | } |
||
| 52 | |||
| 64 |