Completed
Push — master ( 3a9e02...ed265b )
by Pierre
03:47
created

ListenerAbstract   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 21
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
eloc 2
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hash() 0 3 1
A publish() 0 2 1
1
<?php
2
3
namespace App\Component\Pubsub;
4
5
abstract class ListenerAbstract implements ListenerInterface
6
{
7
    /**
8
     * publish
9
     *
10
     * @param EventInterface $event
11
     * @return void
12
     */
13
    public function publish(EventInterface $event)
14
    {
15
        // do nothing
16
    }
17
18
    /**
19
     * return listener hash string
20
     *
21
     * @return string
22
     */
23
    public function hash(): string
24
    {
25
        return spl_object_hash($this);
26
    }
27
}
28