Passed
Push — master ( d21aeb...6f7326 )
by Alexander
27:36 queued 12:36
created

EventDispatcherProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Provider;
6
7
use Psr\Container\ContainerInterface;
8
use Psr\EventDispatcher\EventDispatcherInterface;
9
use Psr\EventDispatcher\ListenerProviderInterface;
10
use Yiisoft\Di\Container;
11
use Yiisoft\Di\Support\ServiceProvider;
12
use Yiisoft\EventDispatcher\Dispatcher\Dispatcher;
13
use Yiisoft\EventDispatcher\Provider\Provider;
14
15
final class EventDispatcherProvider extends ServiceProvider
16
{
17
    public function register(Container $container): void
18
    {
19
        $container->set(ListenerProviderInterface::class, Provider::class);
20
        $container->set(EventDispatcherInterface::class, Dispatcher::class);
21
    }
22
}
23