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

EventDTO::getEventInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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