Passed
Push — master ( 9638a7...1ba969 )
by Alexander
02:32
created

EventDispatcherProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 9
ccs 3
cts 3
cp 1
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\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 2
    public function register(Container $container): void
20
    {
21 2
        $container->set(ListenerProviderInterface::class, Provider::class);
22 2
        $container->set(EventDispatcherInterface::class, Dispatcher::class);
23 2
    }
24
}
25