| 1 | <?php |
||
| 14 | class RealDiffTest extends \PHPUnit_Framework_TestCase |
||
| 15 | { |
||
| 16 | public function testXmlEqual() |
||
| 20 | |||
| 21 | public function testNotEqualXml() |
||
| 26 | |||
| 27 | protected function diff(string $text1, string $text2) { |
||
| 49 | |||
| 50 | protected function getFirstText() |
||
| 64 | |||
| 65 | protected function getSecondText() |
||
| 77 | |||
| 78 | protected function prepare($text) |
||
| 82 | } |
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.