1 | <?php |
||
9 | class Urban extends State |
||
10 | { |
||
11 | const REGEX = '/^(\d{3})(\d{3})(\d{3})(\d{3})$/'; |
||
12 | |||
13 | const FORMAT = '$1.$2.$3.$4'; |
||
14 | |||
15 | const LENGTH = 12; |
||
16 | |||
17 | const DIGITS_COUNT = 1; |
||
18 | |||
19 | 7 | public function __construct() |
|
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * No extract any digit |
||
28 | */ |
||
29 | 4 | public function extractBaseNumber($number) |
|
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 5 | public function extractCheckerDigit($number) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | * |
||
45 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_SP.html |
||
46 | */ |
||
47 | 3 | public function calculateDigit($baseNumber) |
|
59 | |||
60 | 3 | private function calculateFirstDigit($baseNumber) |
|
71 | |||
72 | 3 | private function calculateSecondDigit($baseNumber) |
|
83 | } |
||
84 |