1 | <?php |
||
8 | class Tocantins implements StateInterface |
||
9 | { |
||
10 | const LABEL = 'Tocantins'; |
||
11 | |||
12 | /** |
||
13 | * @var State |
||
14 | */ |
||
15 | private $calculation; |
||
16 | |||
17 | 10 | public function __construct() |
|
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | 10 | public function getState() |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 10 | public function getLength() |
|
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | 1 | public function getRegex() |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 1 | public function getFormat() |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 10 | public function getNumberOfDigits() |
|
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 10 | public function normalizeNumber($number) |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 7 | public function extractBaseNumber($number) |
|
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 10 | public function extractCheckerDigit($number) |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 7 | public function calculateDigit($baseNumber) |
|
95 | |||
96 | /** |
||
97 | * It will load calculation strategy based on number format. |
||
98 | * |
||
99 | * @param string $number Number of document. |
||
100 | */ |
||
101 | 10 | private function defineStrategy($number) |
|
108 | } |
||
109 |