Passed
Pull Request — master (#10)
by Alice
02:01
created

AbstractThreadMediator::notify()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 1
	protected function getMediator()
17
	{
18 1
		return $this->mediator;
19
	}
20
21 5
	public function setMediator(Mediator $mediator)
22
	{
23 5
		$this->mediator = $mediator;
24 5
	}
25
26
	/**
27
	 * @param EventInterface $event
28
	 */
29 1
	protected function notify(EventInterface $event)
30
	{
31 1
		$this->getMediator()->notify($event);
32 1
	}
33
34
}
35