1 | <?php |
||
15 | class FinderTest extends \PHPUnit_Framework_TestCase |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var Finder |
||
20 | */ |
||
21 | private $finder; |
||
22 | |||
23 | /** |
||
24 | * Set up |
||
25 | */ |
||
26 | public function setUp() |
||
32 | |||
33 | /** |
||
34 | * Test find, wrong parameter pattern |
||
35 | * |
||
36 | * @expectedException \InvalidArgumentException |
||
37 | */ |
||
38 | public function testFindWrongParameterPattern() |
||
45 | |||
46 | /** |
||
47 | * Test find, not found |
||
48 | */ |
||
49 | public function testFindNotFound() |
||
58 | |||
59 | /** |
||
60 | * Test find Ok |
||
61 | */ |
||
62 | public function testFindOk() |
||
74 | |||
75 | } |
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.