1 | <?php |
||
13 | 1 | class StoragePdo extends AbstractChecker |
|
14 | { |
||
15 | /** |
||
16 | 1 | * @var string |
|
17 | */ |
||
18 | protected $target = 'connect'; |
||
19 | |||
20 | /** |
||
21 | 1 | * @param array $connect |
|
22 | * |
||
23 | 1 | * @return \PDO |
|
24 | 1 | */ |
|
25 | protected function createInstance(array $connect) |
||
37 | 1 | ||
38 | /** |
||
39 | * @param array $connect |
||
40 | * @param boolean $expectExists |
||
41 | * @param array $task |
||
42 | * |
||
43 | * @throws FailException |
||
44 | * @throws SuccessException |
||
45 | */ |
||
46 | protected function testExists(array $connect, $expectExists, array $task) |
||
64 | } |
||
65 |
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.