Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function testItWillHaveSimpleStorageFields() |
||
12 | { |
||
13 | $data = $this->getSimpleData(); |
||
14 | $storage = new Storage(); |
||
15 | |||
16 | $this->assertEquals($data['status_url'], $storage->getStatusUrl()); |
||
17 | $this->assertEquals($data['payment'], $storage->getPayment()); |
||
18 | $this->assertNotEmpty($storage->getAccount()); |
||
19 | $this->assertEmpty($storage->getModel()); |
||
20 | $this->assertTrue(is_array($storage->getData())); |
||
21 | } |
||
22 | |||
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.