1 | <?php |
||
8 | class Modulo10 |
||
9 | { |
||
10 | /** |
||
11 | * Check if the last digit of number is a valid modulo 10 check digit |
||
12 | * |
||
13 | * @param string $number |
||
14 | * @return bool |
||
15 | */ |
||
16 | 99 | public static function isValid($number) |
|
20 | |||
21 | /** |
||
22 | * Calculate the modulo 10 check digit for number |
||
23 | * |
||
24 | * @param string $number |
||
25 | * @return string |
||
26 | * @throws Exception\InvalidStructureException If $number is not numerical |
||
27 | */ |
||
28 | 103 | public static function calculateCheckDigit($number) |
|
53 | } |
||
54 |