1 | <?php |
||
8 | final class Pernambuco implements StateInterface |
||
9 | { |
||
10 | const LABEL = 'Pernambuco'; |
||
11 | |||
12 | /** |
||
13 | * @var State |
||
14 | */ |
||
15 | private $calculation; |
||
16 | |||
17 | 12 | public function __construct() |
|
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | 12 | public function getState() |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 12 | public function normalizeNumber($number) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 12 | public function getLength() |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 2 | public function getFormat() |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 12 | public function getNumberOfDigits() |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 2 | public function getRegex() |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | * |
||
75 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_PE.html |
||
76 | */ |
||
77 | 9 | public function calculateDigit($baseNumber) |
|
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | 9 | public function extractBaseNumber($number) |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 12 | public function extractCheckerDigit($number) |
|
97 | |||
98 | /** |
||
99 | * It will load calculation strategy based on number format. |
||
100 | * |
||
101 | * @param string $number Number of document. |
||
102 | */ |
||
103 | 12 | private function defineStrategy($number) |
|
110 | } |
||
111 |