| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace BuildR\TestTools\DataSetLoader\XML\Parser; |
||
| 23 | private function createTestArrayFromXmlElement(SimpleXMLElement $element) { |
||
| 24 | $result = []; |
||
|
|
|||
| 25 | $dataSets = $element->xpath('*'); |
||
| 26 | |||
| 27 | foreach($dataSets as $dataSet) { |
||
| 28 | $values = []; |
||
| 29 | $properties = $dataSet->xpath('*'); |
||
| 30 | |||
| 31 | foreach($properties as $property) { |
||
| 32 | $typedGetter = new SimpleXMLNodeTypedAttributeGetter($property); |
||
| 33 | die(var_dump($typedGetter->value)); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 49 |
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.