Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
12 | final class DeletePropertyMutation implements MutationInterface |
||
13 | { |
||
14 | |||
15 | private $path; |
||
16 | |||
17 | public function __construct(PathInterface $path) |
||
18 | { |
||
19 | $this->path = $path; |
||
20 | } |
||
21 | |||
22 | public function __invoke(EventInterface $event, ValueWalkerInterface $valueWalker): Iterator |
||
23 | { |
||
24 | if ($this->path->contains($event->getPath())) { |
||
25 | return; |
||
26 | } |
||
27 | yield $event; |
||
28 | } |
||
29 | |||
30 | public function reset(): void |
||
32 | } |
||
33 | } |
||
34 |