Passed
Pull Request — master (#23)
by Wilmer
25:07 queued 10:12
created

EventDispatcherProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
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 9
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 Yiisoft\EventDispatcher\Provider;
6
7
use Psr\EventDispatcher\EventDispatcherInterface;
8
use Psr\EventDispatcher\ListenerProviderInterface;
9
use Yiisoft\Di\Container;
10
use Yiisoft\Di\Support\ServiceProvider;
11
use Yiisoft\EventDispatcher\Dispatcher\Dispatcher;
12
13
final class EventDispatcherProvider extends ServiceProvider
14
{
15
    /**
16
     * @suppress PhanAccessMethodProtected
17
     */
18
    public function register(Container $container): void
19
    {
20
        $container->set(ListenerProviderInterface::class, Provider::class);
21
        $container->set(EventDispatcherInterface::class, Dispatcher::class);
22
    }
23
}
24