TestListener::after()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace ivol\tests\Helper;
3
4
use ivol\EventDispatcher\AfterExecuteEvent;
5
use ivol\EventDispatcher\BeforeExecuteEvent;
6
7
class TestListener
8
{
9
    /**
10
     * @var Event[]
11
     */
12
    private $events = array();
13
14
    public function before(BeforeExecuteEvent $event) {
15
        $this->events[] = $event;
16
    }
17
18
    public function after(AfterExecuteEvent $event) {
19
        $this->events[] = $event;
20
    }
21
22
    /**
23
     * @return \Composer\EventDispatcher\Event[]
24
     */
25
    public function getEvents()
26
    {
27
        return $this->events;
28
    }
29
}