Passed
Push — master ( f8cb93...547c02 )
by Siim
12:38
created

EventDispatcherTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDispatcher() 0 3 1
A getDispatcher() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 15.02.19
6
 * Time: 6:44
7
 */
8
9
namespace Sf4\Api\RequestHandler\Traits;
10
11
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
12
13
trait EventDispatcherTrait
14
{
15
16
    /** @var EventDispatcherInterface $dispatcher */
17
    protected $dispatcher;
18
19
    /**
20
     * @return EventDispatcherInterface
21
     */
22
    public function getDispatcher(): EventDispatcherInterface
23
    {
24
        return $this->dispatcher;
25
    }
26
27
    /**
28
     * @param EventDispatcherInterface $dispatcher
29
     */
30
    public function setDispatcher(EventDispatcherInterface $dispatcher): void
31
    {
32
        $this->dispatcher = $dispatcher;
33
    }
34
}
35