1 | <?php |
||
7 | trait MapMethods |
||
8 | { |
||
9 | /** |
||
10 | * mergeCommonData |
||
11 | * Insert description here. |
||
12 | * |
||
13 | * @param $methodHandler |
||
14 | * @param $arguments |
||
15 | * |
||
16 | * @return |
||
17 | */ |
||
18 | 3 | private function mergeCommonData($methodHandler, $arguments = []) |
|
29 | |||
30 | /** |
||
31 | * getSetterMethodFromKey |
||
32 | * Insert description here. |
||
33 | * |
||
34 | * @param $key |
||
35 | * |
||
36 | * @return |
||
37 | */ |
||
38 | 4 | private function getSetterMethodFromKey($key) |
|
42 | |||
43 | /** |
||
44 | * fillNull |
||
45 | * Insert description here. |
||
46 | * |
||
47 | * @param $arguments |
||
48 | * @param $value |
||
49 | * |
||
50 | * @return |
||
51 | */ |
||
52 | 1 | private function fillNull($arguments, $value) |
|
71 | |||
72 | /** |
||
73 | * @param $arguments |
||
74 | * @param $class |
||
75 | * |
||
76 | * @return mixed |
||
77 | */ |
||
78 | 6 | private function prepareMethodHandler($arguments, $class) |
|
97 | } |
||
98 |
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.