| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 80% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | final class EventDispatcherAdapter implements EventRegistry |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var EventDispatcherInterface |
||
| 14 | */ |
||
| 15 | private $dispatcher; |
||
| 16 | |||
| 17 | 36 | public function __construct(EventDispatcherInterface $dispatcher = null) |
|
| 18 | { |
||
| 19 | 36 | if (! $dispatcher) { |
|
| 20 | 36 | $dispatcher = new EventDispatcher(); |
|
| 21 | } |
||
| 22 | 36 | $this->dispatcher = $dispatcher; |
|
| 23 | 36 | } |
|
| 24 | |||
| 25 | 23 | public function dispatch(string $name, StateEvent $event): void |
|
| 28 | 23 | } |
|
| 29 | |||
| 30 | public function addListener(string $event, callable $listener): void |
||
| 35 |