Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | 36 | public function createMapper(PropertyMappingMarker $marker) |
|
38 | { |
||
39 | 36 | $markerClass = \get_class($marker); |
|
40 | 36 | $mapperClass = $this->mappings[$markerClass] ?? $this->default; |
|
41 | |||
42 | // descend the children |
||
43 | 36 | $child = $marker->getValue() instanceof PropertyMappingMarker |
|
44 | 10 | ? $this->createMapper($marker->getValue()) |
|
45 | 36 | : null; |
|
46 | |||
47 | 36 | return new $mapperClass($marker, $child); |
|
48 | } |
||
50 |