Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
37 | public function testOptionsFileRepresentsDefaults() |
||
38 | { |
||
39 | $options = new Options(); |
||
40 | |||
41 | $optionsFromFile = new Options( |
||
42 | json_decode(file_get_contents( |
||
43 | __DIR__ . '/../../../data/config.dist.json' |
||
44 | ), true) |
||
45 | ); |
||
46 | |||
47 | $this->assertEquals($options, $optionsFromFile); |
||
48 | } |
||
49 | |||
59 | } |
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.