• 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

28.57
/src/MySQLReplication/Event/DTO/RotateDTO.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 RotateDTO extends EventDTO
10
{
11
    private $position;
12
    private $nextBinlog;
13
    private $type = ConstEventsNames::ROTATE;
14

15
    public function __construct(
16
        EventInfo $eventInfo,
17
        int $position,
18
        string $nextBinlog
19
    ) {
20
        parent::__construct($eventInfo);
1✔
21

22
        $this->position = $position;
1✔
23
        $this->nextBinlog = $nextBinlog;
1✔
24
    }
25

26
    public function getPosition(): int
27
    {
28
        return $this->position;
×
29
    }
30

31
    public function getNextBinlog(): string
32
    {
33
        return $this->nextBinlog;
×
34
    }
35

36
    public function getType(): string
37
    {
38
        return $this->type;
1✔
39
    }
40

41
    public function __toString(): string
42
    {
43
        return PHP_EOL .
×
44
            '=== Event ' . $this->getType() . ' === ' . PHP_EOL .
×
45
            'Date: ' . $this->eventInfo->getDateTime() . PHP_EOL .
×
46
            'Log position: ' . $this->eventInfo->getPos() . PHP_EOL .
×
47
            'Event size: ' . $this->eventInfo->getSize() . PHP_EOL .
×
48
            'Binlog position: ' . $this->position . PHP_EOL .
×
49
            'Binlog filename: ' . $this->nextBinlog . PHP_EOL;
×
50
    }
51

52
    #[\ReturnTypeWillChange]
53
    public function jsonSerialize()
54
    {
55
        return get_object_vars($this);
×
56
    }
57
}
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