| 1 | <?php |
||
| 10 | class Modulo10 extends Base implements Calculator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Check if the last digit of number is a valid modulo 10 check digit |
||
| 14 | */ |
||
| 15 | 5 | public function isValid(string $number): bool |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Calculate the modulo 10 check digit for number |
||
| 22 | * |
||
| 23 | * @throws InvalidStructureException If $number is not numerical |
||
| 24 | */ |
||
| 25 | 10 | public function calculateCheckDigit(string $number): string |
|
| 39 | 4 | ||
| 40 | protected function calculateSum(string $number): int |
||
| 53 | } |
||
| 54 |