Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
38 | public function replacePaths( |
||
39 | NodeValueInterface $rootNode, |
||
40 | NodeValueInterface $newNode, |
||
41 | PathInterface ...$paths |
||
42 | ): NodeValueInterface { |
||
43 | $modifier = new ReplaceMutation($newNode, ...$paths); |
||
44 | $events = $this |
||
45 | ->valueWalker |
||
46 | ->createMutableEventIterator($rootNode, new Path(), $modifier); |
||
47 | |||
48 | return $this |
||
49 | ->eventDecoder |
||
50 | ->exportExistingEvents($events); |
||
51 | } |
||
53 |