| 1 | <?php |
||
| 13 | class StoragePdo extends AbstractChecker |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $target = 'connect'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array $connect |
||
| 22 | * |
||
| 23 | * @return \PDO |
||
| 24 | */ |
||
| 25 | protected function createInstance(array $connect) |
||
| 37 | |||
| 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
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.