1 | <?php |
||
7 | class RioGrandeDoNorte extends State |
||
8 | { |
||
9 | const LABEL = 'RioGrandeDoNorte'; |
||
10 | |||
11 | const REGEX = '/^(20)(\d)?(\d{3})(\d{3})(\d{1})$/'; |
||
12 | |||
13 | const REGEX_FOR_NINE_NUMBERS = '/^(20)(\d{3})(\d{3})(\d{1})$/'; |
||
14 | |||
15 | const FORMAT = '$1.$2.$3.$4-$5'; |
||
16 | |||
17 | const FORMAT_FOR_NINE_NUMBERS = '$1.$2.$3-$4'; |
||
18 | |||
19 | const LENGTH = 10; |
||
20 | |||
21 | const DIGITS_COUNT = 1; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $length; |
||
|
|||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $format; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $regex; |
||
37 | |||
38 | 13 | public function __construct() |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 13 | public function normalizeNumber($number) |
|
57 | |||
58 | 2 | public function getFormat() |
|
62 | |||
63 | 13 | public function getLength() |
|
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | 2 | public function getRegex() |
|
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | * |
||
79 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_RN.html |
||
80 | */ |
||
81 | 10 | public function calculateDigit($baseNumber) |
|
93 | |||
94 | /** |
||
95 | * @param string $number |
||
96 | */ |
||
97 | 13 | private function applyForNineDigits($number) |
|
105 | } |
||
106 |