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

Moln / php-mysql-replication / 7579707553

19 Jan 2024 05:07AM CUT 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

21.43
/src/MySQLReplication/Event/DTO/TableMapDTO.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
use MySQLReplication\Event\RowEvent\TableMap;
9

10
class TableMapDTO extends EventDTO
11
{
12
    private $type = ConstEventsNames::TABLE_MAP;
13
    private $tableMap;
14

15
    public function __construct(
16
        EventInfo $eventInfo,
17
        TableMap $tableMap
18
    ) {
19
        parent::__construct($eventInfo);
58✔
20

21
        $this->tableMap = $tableMap;
58✔
22
    }
23

24
    public function __toString(): string
25
    {
26
        return PHP_EOL .
×
27
            '=== Event ' . $this->getType() . ' === ' . PHP_EOL .
×
28
            'Date: ' . $this->eventInfo->getDateTime() . PHP_EOL .
×
29
            'Log position: ' . $this->eventInfo->getPos() . PHP_EOL .
×
30
            'Event size: ' . $this->eventInfo->getSize() . PHP_EOL .
×
31
            'Table: ' . $this->tableMap->getTable() . PHP_EOL .
×
32
            'Database: ' . $this->tableMap->getDatabase() . PHP_EOL .
×
33
            'Table Id: ' . $this->tableMap->getTableId() . PHP_EOL .
×
34
            'Columns amount: ' . $this->tableMap->getColumnsAmount() . PHP_EOL;
×
35
    }
36

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

42
    #[\ReturnTypeWillChange]
43
    public function jsonSerialize()
44
    {
45
        return get_object_vars($this);
×
46
    }
47

48
    public function getTableMap(): TableMap
49
    {
50
        return $this->tableMap;
×
51
    }
52
}
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