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

EventDispatcherProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 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