1 | <?php |
||
17 | class ApiTest extends TestCase |
||
18 | { |
||
19 | /** |
||
20 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
21 | */ |
||
22 | public function testConstruct_1(): void |
||
27 | |||
28 | /** |
||
29 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
30 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\ConfigurationException |
||
31 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\InvalidFileArgumentException |
||
32 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\UnoconvException |
||
33 | */ |
||
34 | public function testConstruct_invalid_1(): void |
||
46 | |||
47 | /** |
||
48 | * @throws \Mrcnpdlk\Api\Unoconv\Exception |
||
49 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\ConfigurationException |
||
50 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\InvalidFileArgumentException |
||
51 | * @throws \Mrcnpdlk\Api\Unoconv\Exception\UnoconvException |
||
52 | */ |
||
53 | public function testConstruct_invalid_2(): void |
||
62 | } |
||
63 |
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.