EventDispatcher::addSubscriber()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Vox\Webservice;
4
5
use Doctrine\Common\EventManager;
6
7
class EventDispatcher extends EventManager implements EventDispatcherInterface
8
{
9 1
    public function addListener($event, $listener)
10
    {
11 1
        $this->addEventListener($event, $listener);
12
        
13 1
        return $this;
14
    }
15
16
    public function addSubscriber($subscriber)
17
    {
18
        $this->addEventSubscriber($subscriber);
19
        
20
        return $this;
21
    }
22
23 2
    public function dispatch(string $event, $context)
24
    {
25 2
        $this->dispatchEvent($event, $context);
26 2
    }
27
}
28