ListenerAbstract::publish()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nymfonya\Component\Pubsub;
6
7
abstract class ListenerAbstract implements ListenerInterface
8
{
9
    /**
10
     * publish
11
     *
12
     * @param EventInterface $event
13
     * @return void
14
     */
15
    public function publish(EventInterface $event)
16
    {
17
        // do nothing
18
    }
19
20
    /**
21
     * return listener hash string
22
     *
23
     * @return string
24
     */
25 1
    public function hash(): string
26
    {
27 1
        return spl_object_hash($this);
28
    }
29
}
30