| 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 |
||
| 41 | private function createEventGenerator(EventInterface $event, ValueWalkerInterface $valueWalker): Generator |
||
| 42 | { |
||
| 43 | if (!$this->path->equals($event->getPath())) { |
||
| 44 | yield $event; |
||
| 45 | |||
| 46 | return; |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($event instanceof AfterObjectEventInterface) { |
||
| 50 | $propertyPath = $this->path->copyWithProperty($this->propertyName); |
||
| 51 | yield new BeforePropertyEvent($this->propertyName, $propertyPath); |
||
| 52 | yield from $valueWalker->createEventIterator($this->value, $propertyPath); |
||
| 53 | yield new AfterPropertyEvent($this->propertyName, $propertyPath); |
||
| 54 | } |
||
| 55 | |||
| 56 | yield $event; |
||
| 57 | } |
||
| 59 |