Passed
Pull Request — master (#14)
by Alex
02:32
created

ImmutableEventDispatcher::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arp\EventDispatcher;
6
7
use Psr\EventDispatcher\ListenerProviderInterface;
8
9
/**
10
 * An event dispatcher that does not expose any methods that are able to modify or change the listener provider
11
 * that is passed in during construction.
12
 *
13
 * @author  Alex Patterson <[email protected]>
14
 * @package Arp\EventDispatcher
15
 */
16
final class ImmutableEventDispatcher extends AbstractEventDispatcher
17
{
18
    /**
19
     * @param ListenerProviderInterface $listenerProvider
20
     */
21
    public function __construct(ListenerProviderInterface $listenerProvider)
22
    {
23
        $this->listenerProvider = $listenerProvider;
24
    }
25
}
26