DispatcherAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 26
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDispatcher() 0 4 1
A setDispatcher() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arnaud
5
 * Date: 04/11/15
6
 * Time: 20:17
7
 */
8
9
namespace Ndrx\Profiler\Events;
10
11
use Symfony\Component\EventDispatcher\EventDispatcher;
12
13
trait DispatcherAwareTrait
14
{
15
    /**
16
     * @var EventDispatcher
17
     */
18
    protected $dispatcher;
19
20
    /**
21
     * @return EventDispatcher
22
     */
23 130
    public function getDispatcher()
24
    {
25 130
        return $this->dispatcher;
26
    }
27
28
    /**
29
     * @param EventDispatcher $eventDispatcher
30
     * @return $this
31
     */
32 102
    public function setDispatcher(EventDispatcher $eventDispatcher)
33
    {
34 102
        $this->dispatcher = $eventDispatcher;
35
36 102
        return $this;
37
    }
38
}
39