• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Moln / php-mysql-replication / 7579707553

19 Jan 2024 05:07AM UTC coverage: 80.809% (-0.02%) from 80.826%
7579707553

push

github

web-flow
Merge branch `krowinski master`  (#16)

* Sync `krowinski:master` into master:

- Fix JsonBinaryDecoder when there is NULL in data or if there is long.
- Preserve threadId in QUERY_EVENT.

* Fix CS

---------

Co-authored-by: xiemaomao <xiemaomao@enjoymi.com>

1259 of 1558 relevant lines covered (80.81%)

26.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/MySQLReplication/Event/DTO/MariaDbGtidLogDTO.php
1
<?php
2
declare(strict_types=1);
3

4
namespace MySQLReplication\Event\DTO;
5

6
use MySQLReplication\Definitions\ConstEventsNames;
7
use MySQLReplication\Event\EventInfo;
8

9
class MariaDbGtidLogDTO extends EventDTO
10
{
11
    private $type = ConstEventsNames::MARIADB_GTID;
12
    private $flag;
13
    private $domainId;
14
    private $mariaDbGtid;
15

16
    public function __construct(
17
        EventInfo $eventInfo,
18
        int $flag,
19
        int $domainId,
20
        string $mariaDbGtid
21
    ) {
22
        parent::__construct($eventInfo);
×
23

24
        $this->flag = $flag;
×
25
        $this->domainId = $domainId;
×
26
        $this->mariaDbGtid = $mariaDbGtid;
×
27
    }
28

29
    public function __toString(): string
30
    {
31
        return PHP_EOL .
×
32
            '=== Event ' . $this->getType() . ' === ' . PHP_EOL .
×
33
            'Date: ' . $this->eventInfo->getDateTime() . PHP_EOL .
×
34
            'Log position: ' . $this->eventInfo->getPos() . PHP_EOL .
×
35
            'Event size: ' . $this->eventInfo->getSize() . PHP_EOL .
×
36
            'Flag: ' . var_export($this->flag, true) . PHP_EOL .
×
37
            'Domain Id: ' . $this->domainId . PHP_EOL .
×
38
            'Sequence Number: ' . $this->mariaDbGtid . PHP_EOL;
×
39
    }
40

41

42
    public function getType(): string
43
    {
44
        return $this->type;
×
45
    }
46

47
    #[\ReturnTypeWillChange]
48
    public function jsonSerialize()
49
    {
50
        return get_object_vars($this);
×
51
    }
52

53
    public function getFlag(): int
54
    {
55
        return $this->flag;
×
56
    }
57

58
    public function getMariaDbGtid(): string
59
    {
60
        return $this->mariaDbGtid;
×
61
    }
62

63
    public function getDomainId(): int
64
    {
65
        return $this->domainId;
×
66
    }
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc