1 | <?php |
||
12 | class ActionTest extends \PHPUnit_Framework_TestCase |
||
13 | { |
||
14 | /** |
||
15 | * Tests Action::getType |
||
16 | */ |
||
17 | public function testGetType() |
||
23 | |||
24 | /** |
||
25 | * Tests Action::getAction |
||
26 | */ |
||
27 | public function testGetAction() |
||
32 | |||
33 | /** |
||
34 | * Tests Action::getOption |
||
35 | */ |
||
36 | public function testGetOptions() |
||
41 | |||
42 | /** |
||
43 | * Tests Action::__construct |
||
44 | */ |
||
45 | public function testEmptyOptions() |
||
52 | |||
53 | /** |
||
54 | * Tests Action::__construct |
||
55 | * |
||
56 | * @expectedException \Exception |
||
57 | */ |
||
58 | public function testInvalidType() |
||
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.