MariaDbGtidEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 15
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A makeMariaDbGTIDLogDTO() 0 13 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MySQLReplication\Event;
5
6
use MySQLReplication\Event\DTO\MariaDbGtidLogDTO;
7
8
class MariaDbGtidEvent extends EventCommon
9
{
10
    public function makeMariaDbGTIDLogDTO(): MariaDbGtidLogDTO
11
    {
12
        $mariaDbGtid = $this->binaryDataReader->readUInt64();
13
        $domainId = $this->binaryDataReader->readUInt32();
14
        $flag = $this->binaryDataReader->readUInt8();
15
16
        $this->eventInfo->getBinLogCurrent()->setMariaDbGtid($mariaDbGtid);
17
18
        return new MariaDbGtidLogDTO(
19
            $this->eventInfo,
20
            $flag,
21
            $domainId,
22
            $mariaDbGtid
23
        );
24
    }
25
}