Test Failed
Pull Request — master (#10)
by Alice
04:15
created

AbstractThreadMediator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 24
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setMediator() 0 3 1
A getMediator() 0 3 1
A notify() 0 3 1
1
<?php
2
3
namespace Wonderland\Thread;
4
5
use Wonderland\Thread\Mediator\Event\EventInterface;
6
use Wonderland\Thread\Mediator\Mediator;
7
8
class AbstractThreadMediator
9
{
10
    /** @var Mediator */
11
    private $mediator;
12
13
    /**
14
     * @return Mediator
15
     */
16
    protected function getMediator()
17
    {
18
        return $this->mediator;
19
    }
20
21
    public function setMediator(Mediator $mediator)
22
    {
23
        $this->mediator = $mediator;
24
    }
25
26
    /**
27
     * @param EventInterface $event
28
     */
29
    protected function notify(EventInterface $event)
30
    {
31
        $this->getMediator()->notify($event);
32
    }
33
}