Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function testConstruct_3(): void |
||
40 | { |
||
41 | $oConfig = new Config([ |
||
42 | 'binary' => 'some_binary_file', |
||
43 | 'host' => '127.0.0.1', |
||
44 | 'port' => 2345, |
||
45 | 'docType' => DocType::GRAPHICS(), |
||
46 | 'format' => FormatType::PDF(), |
||
47 | 'timeout' => 10, |
||
48 | ]); |
||
49 | $this->assertSame(DocType::GRAPHICS, $oConfig->getDocType()->getValue()); |
||
50 | $this->assertSame(FormatType::PDF, $oConfig->getFormat()->getValue()); |
||
51 | $this->assertSame(10, $oConfig->getTimeout()); |
||
52 | } |
||
53 | |||
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.