TestListener   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
c 1
b 1
f 0
lcom 1
cbo 0
dl 0
loc 23
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A before() 0 3 1
A after() 0 3 1
A getEvents() 0 4 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
}