Passed
Pull Request — master (#14)
by Alex
03:06
created

ImmutableEventDispatcher   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

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