Conditions | 5 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function createInstance(array $connect) |
||
26 | { |
||
27 | // Exception on fail connection |
||
28 | $instance = new \PDO( |
||
29 | isset($connect['dsn']) ? $connect['user'] : null, |
||
30 | isset($connect['user']) ? $connect['user'] : null, |
||
31 | isset($connect['password']) ? $connect['password'] : null, |
||
32 | isset($connect['options']) ? $connect['options'] : null |
||
33 | ); |
||
34 | |||
35 | return $instance; |
||
36 | } |
||
37 | |||
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.