1 | <?php |
||
16 | class ConfigTest extends TestCase |
||
17 | { |
||
18 | /** |
||
19 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
20 | */ |
||
21 | public function testConstruct_1(): void |
||
26 | |||
27 | /** |
||
28 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
29 | */ |
||
30 | public function testConstruct_2(): void |
||
35 | |||
36 | /** |
||
37 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
38 | */ |
||
39 | public function testConstruct_3(): void |
||
53 | |||
54 | /** |
||
55 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
56 | */ |
||
57 | public function testConstruct_invalid(): void |
||
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.