Passed
Push — master ( 41866b...658441 )
by kacper
05:20
created

EventDTO   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEventInfo() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MySQLReplication\Event\DTO;
5
6
use JsonSerializable;
7
use MySQLReplication\Event\EventInfo;
8
use Symfony\Component\EventDispatcher\GenericEvent;
9
10
/**
11
 * @see https://dev.mysql.com/doc/internals/en/event-meanings.html
12
 */
13
abstract class EventDTO extends GenericEvent implements JsonSerializable
14
{
15
    protected $eventInfo;
16
17 57
    public function __construct(
18
        EventInfo $eventInfo
19
    ) {
20 57
        $this->eventInfo = $eventInfo;
21 57
    }
22
23 1
    public function getEventInfo(): EventInfo
24
    {
25 1
        return $this->eventInfo;
26
    }
27
28
    abstract public function getType(): string;
29
30
    abstract public function __toString(): string;
31
}
32