1 | <?php |
||
8 | class Eleven extends State |
||
9 | { |
||
10 | const LABEL = 'Tocantins'; |
||
11 | |||
12 | const REGEX = '/^(\d{2})(\d{2})(\d{3})(\d{3})(\d{1})$/'; |
||
13 | |||
14 | const FORMAT = '$1.$2.$3.$4-$5'; |
||
15 | |||
16 | const LENGTH = 11; |
||
17 | |||
18 | const DIGITS_COUNT = 1; |
||
19 | |||
20 | 10 | public function __construct() |
|
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | 2 | public function extractBaseNumber($number) |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | * |
||
38 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_TO.html |
||
39 | */ |
||
40 | 2 | public function calculateDigit($baseNumber) |
|
50 | |||
51 | /** |
||
52 | * Removes digits should not goes to calculate digit. |
||
53 | * |
||
54 | * They digits are in position 3 and 4. |
||
55 | * |
||
56 | * @param string $baseNumber Base number. |
||
57 | * |
||
58 | * @return string Returns base number without fixed digits. |
||
59 | */ |
||
60 | 2 | private function removeFixedDigits($baseNumber) |
|
64 | } |
||
65 |