1 | <?php |
||
17 | final class JudiciaryProcess extends AbstractDocument |
||
18 | { |
||
19 | const LENGTH = 20; |
||
20 | |||
21 | const LABEL = 'PROCESSO_JUDICIAL'; |
||
22 | |||
23 | const REGEX = '/^([\d]{7})([\d]{2})([\d]{4})([\d]{1})([\d]{2})([\d]{0,4})$/'; |
||
24 | |||
25 | const NUMBER_OF_DIGITS = 2; |
||
26 | |||
27 | /** |
||
28 | * Identify sequential number of process by origin unit. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $sequentialNumber; |
||
33 | |||
34 | /** |
||
35 | * Identifies the year the process is filed. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $year; |
||
40 | |||
41 | /** |
||
42 | * Identifies segment of the Judiciary. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private $judiciary; |
||
47 | |||
48 | /** |
||
49 | * Identifies of court from Judiciary. |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | private $court; |
||
54 | |||
55 | /** |
||
56 | * unit of origin of the process. |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | private $origin; |
||
61 | |||
62 | 22 | public function __construct($number) |
|
68 | |||
69 | 11 | public static function createFromString($number) |
|
73 | |||
74 | /** |
||
75 | * Extract identification numbers. |
||
76 | * |
||
77 | * @param string $number |
||
78 | */ |
||
79 | 22 | private function extractNumbers($number) |
|
90 | |||
91 | 4 | public function format() |
|
97 | |||
98 | 22 | protected function extractCheckerDigit($number) |
|
102 | |||
103 | 16 | protected function extractBaseNumber($number) |
|
107 | |||
108 | /** |
||
109 | * Calculate check digit Algoritm Module 97 Base 10 (ISO 7064) |
||
110 | * Anexo VIII da Resolução CNJ no 65, de 16 de dezembro de 2008. |
||
111 | * |
||
112 | * @see http://www.cnj.jus.br/busca-atos-adm?documento=2748 |
||
113 | * @see http://www.cnj.jus.br/images/stories/docs_cnj/resolucao/anexorescnj_65.pdf |
||
114 | * |
||
115 | * @param string $input |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | 16 | public function calculateDigit($input) |
|
133 | } |
||
134 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.