reliqarts /
laravel-logistiq
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace ReliqArts\Logistiq\Utility\Services; |
||
| 6 | |||
| 7 | use Illuminate\Contracts\Events\Dispatcher; |
||
| 8 | use ReliqArts\Logistiq\Utility\Contracts\EventDispatcher as EventDispatcherContract; |
||
| 9 | |||
| 10 | final class EventDispatcher implements EventDispatcherContract |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Dispatcher |
||
| 14 | */ |
||
| 15 | private $dispatcher; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * EventDispatcher constructor. |
||
| 19 | * |
||
| 20 | * @param Dispatcher $dispatcher |
||
| 21 | */ |
||
| 22 | public function __construct(Dispatcher $dispatcher) |
||
| 23 | { |
||
| 24 | $this->dispatcher = $dispatcher; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Wrapper around Illuminate dispatcher. |
||
| 29 | * |
||
| 30 | * @param mixed ...$args |
||
| 31 | * |
||
| 32 | * @return null|array |
||
| 33 | * |
||
| 34 | * @see \Illuminate\Contracts\Events\Dispatcher for details on arguments |
||
| 35 | */ |
||
| 36 | public function dispatch(...$args): ?array |
||
| 37 | { |
||
| 38 | return $this->dispatcher->dispatch(...$args); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 39 | } |
||
| 40 | } |
||
| 41 |