• 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

27.27
/src/MySQLReplication/Event/DTO/XidDTO.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 XidDTO extends EventDTO
10
{
11
    private $type = ConstEventsNames::XID;
12
    private $xid;
13

14
    public function __construct(
15
        EventInfo $eventInfo,
16
        string $xid
17
    ) {
18
        parent::__construct($eventInfo);
6✔
19

20
        $this->xid = $xid;
6✔
21
    }
22

23
    public function getXid(): string
24
    {
25
        return $this->xid;
×
26
    }
27

28
    public function __toString(): string
29
    {
30
        return PHP_EOL .
×
31
            '=== Event ' . $this->getType() . ' === ' . PHP_EOL .
×
32
            'Date: ' . $this->eventInfo->getDateTime() . PHP_EOL .
×
33
            'Log position: ' . $this->eventInfo->getPos() . PHP_EOL .
×
34
            'Event size: ' . $this->eventInfo->getSize() . PHP_EOL .
×
35
            'Transaction ID: ' . $this->xid . PHP_EOL;
×
36
    }
37

38
    public function getType(): string
39
    {
40
        return $this->type;
6✔
41
    }
42

43
    #[\ReturnTypeWillChange]
44
    public function jsonSerialize()
45
    {
46
        return get_object_vars($this);
×
47
    }
48
}
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