| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 59 | public function testEquals() |
||
| 60 | { |
||
| 61 | // arrange |
||
| 62 | $obj_a = new ValueObjectImpl('a'); |
||
| 63 | $obj_b = new ValueObjectImpl('a'); |
||
| 64 | |||
| 65 | // act |
||
| 66 | $isEquals_func = $obj_a->equals($obj_b); |
||
| 67 | $isEquals_doubleOperator = $obj_a == $obj_b; |
||
| 68 | |||
| 69 | // assert |
||
| 70 | $this->assertTrue($isEquals_func); |
||
| 71 | $this->assertTrue($isEquals_doubleOperator); |
||
| 72 | } |
||
| 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.