| 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, wrong parameter fileInfo |
||
| 48 | * |
||
| 49 | * @expectedException \TypeError |
||
| 50 | */ |
||
| 51 | public function testFindWrongParameterFileInfo() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Test find, not found |
||
| 61 | */ |
||
| 62 | public function testFindNotFound() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Test find Ok |
||
| 74 | */ |
||
| 75 | public function testFindOk() |
||
| 87 | |||
| 88 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.