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