Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
LeagueDispatcher
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 dispatch
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3// ╔════════════════════════════════════════════════════════════╗
4// ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║
5// ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com>     ║
6// ╚════════════════════════════════════════════════════════════╝
7
8declare(strict_types=1);
9
10namespace Phexium\Plugin\Dispatcher\Adapter;
11
12use League\Event\EventDispatcher as LeagueEventDispatcher;
13use Override;
14use Phexium\Plugin\Dispatcher\Port\DispatcherInterface;
15
16final readonly class LeagueDispatcher implements DispatcherInterface
17{
18    public function __construct(
19        private LeagueEventDispatcher $leagueEventDispatcher,
20    ) {}
21
22    #[Override]
23    public function dispatch(object $event): object
24    {
25        return $this->leagueEventDispatcher->dispatch($event);
26    }
27}