Completed
Push — master ( 089512...9dbb81 )
by Jimmy K. Oak
9s
created

EventSubscriber   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
isSubscribedTo() 0 1 ?
handle() 0 1 ?
1
<?php
2
3
namespace JimmyOak\Event;
4
5
abstract class EventSubscriber
6
{
7
    /**
8
     * @var EventSubscriberId
9
     */
10
    private $id;
11
12
    public function __construct()
13
    {
14
        $this->id = new EventSubscriberId();
15
    }
16
17
    /**
18
     * @return EventSubscriberId
19
     */
20
    public function getId()
21
    {
22
        return $this->id;
23
    }
24
25
    /**
26
     * @param Event $event
27
     *
28
     * @return bool
29
     */
30
    public abstract function isSubscribedTo(Event $event);
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
31
32
    /**
33
     * @param Event $event
34
     *
35
     * @return void
36
     */
37
    public abstract function handle(Event $event);
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
38
}