| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 23 | public static function map(object $object, SimpleXMLElement $xml, array $mapping): void |
|
| 15 | { |
||
| 16 | 23 | foreach ($mapping as $line) { |
|
| 17 | 23 | $setter = $line['setter']; |
|
| 18 | 23 | $xmlValue = $line['value']; |
|
| 19 | |||
| 20 | 23 | if (isset($xml->$xmlValue)) { |
|
| 21 | 23 | $object->$setter((string) $xml->$xmlValue); |
|
| 22 | } |
||
| 26 |