1 | <?php |
||
5 | class ProcessNumber |
||
6 | { |
||
7 | /** |
||
8 | * Calculate check digit Algoritm Module 97 Base 10 (ISO 7064) |
||
9 | * Anexo VIII da Resolução CNJ no 65, de 16 de dezembro de 2008. |
||
10 | * @param string $input |
||
11 | * @return string |
||
12 | */ |
||
13 | public static function checkDigitJud($input) |
||
31 | |||
32 | /** |
||
33 | * Check if judicial process number have a valid check digit |
||
34 | * @param string $input |
||
35 | * @return boolean |
||
36 | */ |
||
37 | public static function isValidProcJudNumber($input) |
||
46 | |||
47 | /** |
||
48 | * Calculate check digit Algoritm Module 11 |
||
49 | * @param string $input |
||
50 | * @return string |
||
51 | */ |
||
52 | public static function checkDigitAdm($input) |
||
83 | |||
84 | /** |
||
85 | * Check if judicial process number have a valid check digit |
||
86 | * @param string $input |
||
87 | * @return boolean |
||
88 | */ |
||
89 | public static function isValidProcAdmNumber($input) |
||
98 | |||
99 | |||
100 | /** |
||
101 | * Clear input number |
||
102 | * @param string $input |
||
103 | * @return string |
||
104 | * @param int $lenght |
||
105 | * @throws \InvalidArgumentException |
||
106 | */ |
||
107 | protected static function clearString($input, $lenght) |
||
117 | } |
||
118 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.