| 1 | <?php |
||
| 12 | class ValueObjectTest extends TestCase |
||
| 13 | { |
||
| 14 | public function testConstructor() |
||
| 18 | |||
| 19 | /** |
||
| 20 | * test Immutable Class can´t use __constructor again |
||
| 21 | * |
||
| 22 | * @test |
||
| 23 | * @expectedException \Wambo\Core\Immutable\Exception\ImmutableException |
||
| 24 | */ |
||
| 25 | public function testConstructor_asFunction() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @test |
||
| 36 | * @expectedException \Wambo\Core\Immutable\Exception\ImmutableException |
||
| 37 | */ |
||
| 38 | public function testMagicSetMethod() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @test |
||
| 49 | * @expectedException \Wambo\Core\ValueObject\Exception\ValueObjectException |
||
| 50 | */ |
||
| 51 | public function testClone() |
||
| 58 | |||
| 59 | public function testEquals() |
||
| 73 | } |
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.