Passed
Pull Request — master (#56)
by Wilmer
12:32
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 Yiisoft\Yii\Console\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
use Yiisoft\EventDispatcher\Provider\Provider;
13
14
final class EventDispatcherProvider extends ServiceProvider
15
{
16
    /**
17
     * @suppress PhanAccessMethodProtected
18
     */
19
    public function register(Container $container): void
20
    {
21
        $container->set(ListenerProviderInterface::class, Provider::class);
22
        $container->set(EventDispatcherInterface::class, Dispatcher::class);
23
    }
24
}
25