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