1 | <?php |
||
7 | class RioGrandeDoNorte extends State |
||
8 | { |
||
9 | const LONG_NAME = '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 | const SHORT_NAME = 'RN'; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $length; |
||
|
|||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $format; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $regex; |
||
39 | |||
40 | 13 | public function __construct() |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 13 | public function normalizeNumber($number) |
|
59 | |||
60 | 2 | public function getFormat() |
|
64 | |||
65 | 13 | public function getLength() |
|
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 2 | public function getRegex() |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | * |
||
81 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_RN.html |
||
82 | */ |
||
83 | 11 | public function calculateDigit($baseNumber) |
|
95 | |||
96 | /** |
||
97 | * @param string $number |
||
98 | */ |
||
99 | 13 | private function applyForNineDigits($number) |
|
107 | } |
||
108 |