Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | private function createEventGenerator(EventInterface $event, ValueWalkerInterface $valueWalker): Generator |
||
43 | { |
||
44 | if (!$this->path->equals($event->getPath())) { |
||
45 | yield $event; |
||
46 | |||
47 | return; |
||
48 | } |
||
49 | |||
50 | if ($event instanceof AfterObjectEventInterface) { |
||
51 | $propertyPath = $this->path->copyWithProperty($this->propertyName); |
||
52 | yield new BeforePropertyEvent($this->propertyName, $propertyPath); |
||
53 | yield from $valueWalker->createEventIterator($this->value, $propertyPath); |
||
54 | yield new AfterPropertyEvent($this->propertyName, $propertyPath); |
||
55 | } |
||
56 | |||
57 | yield $event; |
||
58 | } |
||
60 |