1 | <?php |
||
8 | final class Pernambuco implements StateInterface |
||
9 | { |
||
10 | const LONG_NAME = 'Pernambuco'; |
||
11 | |||
12 | const SHORT_NAME = 'PE'; |
||
13 | |||
14 | /** |
||
15 | * @var State |
||
16 | */ |
||
17 | private $calculation; |
||
18 | |||
19 | 12 | public function __construct() |
|
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 12 | public function getState() |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 12 | public function normalizeNumber($number) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 12 | public function getLength() |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 2 | public function getFormat() |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 12 | public function getNumberOfDigits() |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 2 | public function getRegex() |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | * |
||
77 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_PE.html |
||
78 | */ |
||
79 | 9 | public function calculateDigit($baseNumber) |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 9 | public function extractBaseNumber($number) |
|
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | 12 | public function extractCheckerDigit($number) |
|
99 | |||
100 | /** |
||
101 | * It will load calculation strategy based on number format. |
||
102 | * |
||
103 | * @param string $number Number of document. |
||
104 | */ |
||
105 | 12 | private function defineStrategy($number) |
|
112 | } |
||
113 |