Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class Mutator implements MutatorInterface |
||
14 | { |
||
15 | |||
16 | private $valueWalker; |
||
17 | |||
18 | private $eventDecoder; |
||
19 | |||
20 | public function __construct(ValueWalkerInterface $walker, EventDecoderInterface $eventDecoder) |
||
24 | } |
||
25 | |||
26 | public function deletePaths(NodeValueInterface $rootNode, PathInterface ...$paths): ?NodeValueInterface |
||
27 | { |
||
28 | $modifier = new DeleteMutation(...$paths); |
||
29 | $events = $this |
||
30 | ->valueWalker |
||
31 | ->createMutableEventIterator($rootNode, new Path(), $modifier); |
||
32 | |||
33 | return $this |
||
34 | ->eventDecoder |
||
35 | ->exportEvents($events); |
||
36 | } |
||
37 | |||
38 | public function replacePaths( |
||
51 | } |
||
52 | } |
||
53 |