EventListener   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
ccs 0
cts 3
cp 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Suricate\Event;
6
7
abstract class EventListener
8
{
9
    protected $payload;
10
    protected string $eventType;
11
12
    public function __construct($payload, string $eventType)
13
    {
14
        $this->payload = $payload;
15
        $this->eventType = $eventType;
16
    }
17
18
    /**
19
     * Event listener handle method
20
     *
21
     * @return boolean|void returning false stop event propagation
22
     */
23
    abstract public function handle();
24
}
25