| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 20 | public function accept(Visitor $visitor) |
||
| 21 | { |
||
| 22 | foreach ($this as $attribute => $value) { |
||
|
|
|||
| 23 | foreach ($this->isTraversable($value) ? $value : [$value] as $element) { |
||
| 24 | if ($element instanceof Visitee) { |
||
| 25 | $element->accept($visitor); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** @noinspection PhpParamsInspection */ |
||
| 31 | $visitor->visit($this); |
||
| 32 | } |
||
| 33 | |||
| 44 |