1 | <?php |
||
10 | final class SimpleHandler extends ProtoHandler |
||
11 | { |
||
12 | /** |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | private $front; |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | private $back; |
||
23 | |||
24 | /** |
||
25 | * |
||
26 | * @param string $name |
||
27 | * @param int $type |
||
28 | * @param string $front |
||
29 | * @param string $back |
||
30 | */ |
||
31 | 18 | public function __construct($name, $type, $front, $back) |
|
38 | |||
39 | /** |
||
40 | * |
||
41 | * @param array $data |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 5 | public function draw(array $data) |
|
57 | } |
||
58 |
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.