| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function validate(AccountNumber $number) |
||
| 40 | { |
||
| 41 | if ($checkDigit = $number->getClearingCheckDigit()) { |
||
| 42 | if (!$this->checksum->isValid($number->getClearingNumber() . $checkDigit)) { |
||
| 43 | throw new InvalidCheckDigitException("Invalid clearing number check digit in $number"); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 |