EventSubscriber::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
}