Total Complexity | 9 |
Total Lines | 87 |
Duplicated Lines | 0 % |
Coverage | 95.24% |
Changes | 0 |
1 | <?php |
||
8 | class Report implements EventSubscriberInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var object |
||
12 | */ |
||
13 | private $processor; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $name; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $target; |
||
24 | |||
25 | 2 | public static function getSubscribedEvents() |
|
26 | { |
||
27 | return [ |
||
28 | 2 | ReportEvent::PROCESS => 'onReportProcess' |
|
29 | ]; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return object |
||
34 | */ |
||
35 | 1 | public function getProcessor() |
|
36 | { |
||
37 | 1 | return $this->processor; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param object $processor |
||
42 | * @return Report |
||
43 | */ |
||
44 | 3 | public function setProcessor($processor) |
|
45 | { |
||
46 | 3 | $this->processor = $processor; |
|
47 | |||
48 | 3 | return $this; |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 1 | public function getName() |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param string $name |
||
61 | * @return Report |
||
62 | */ |
||
63 | 3 | public function setName($name) |
|
64 | { |
||
65 | 3 | $this->name = $name; |
|
66 | 3 | return $this; |
|
67 | } |
||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | 1 | public function getTarget() |
|
75 | } |
||
76 | |||
77 | /** |
||
78 | * @param string $target |
||
79 | * @return Report |
||
80 | */ |
||
81 | 3 | public function setTarget($target) |
|
85 | } |
||
86 | |||
87 | 1 | public function onReportProcess(ReportEvent $event) |
|
88 | { |
||
89 | 1 | $coverage = $event->getCoverage(); |
|
99 |