@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | ); |
87 | 87 | |
88 | 88 | if (ConstEventType::TABLE_MAP_EVENT === $eventInfo->getType()) { |
89 | - $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeTableMapDTO(); |
|
90 | - if ($event !== null) { |
|
91 | - $this->eventDispatcher->dispatch(ConstEventsNames::TABLE_MAP, $event); |
|
92 | - } |
|
89 | + $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeTableMapDTO(); |
|
90 | + if ($event !== null) { |
|
91 | + $this->eventDispatcher->dispatch(ConstEventsNames::TABLE_MAP, $event); |
|
92 | + } |
|
93 | 93 | } else { |
94 | 94 | if ([] !== $this->config->getEventsOnly() && !in_array($eventInfo->getType(), $this->config->getEventsOnly(), true)) { |
95 | 95 | return; |
@@ -100,20 +100,20 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | if (in_array($eventInfo->getType(), [ConstEventType::UPDATE_ROWS_EVENT_V1, ConstEventType::UPDATE_ROWS_EVENT_V2], true)) { |
103 | - $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeUpdateRowsDTO(); |
|
104 | - if ($event !== null) { |
|
105 | - $this->eventDispatcher->dispatch(ConstEventsNames::UPDATE, $event); |
|
106 | - } |
|
103 | + $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeUpdateRowsDTO(); |
|
104 | + if ($event !== null) { |
|
105 | + $this->eventDispatcher->dispatch(ConstEventsNames::UPDATE, $event); |
|
106 | + } |
|
107 | 107 | } elseif (in_array($eventInfo->getType(), [ConstEventType::WRITE_ROWS_EVENT_V1, ConstEventType::WRITE_ROWS_EVENT_V2], true)) { |
108 | - $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeWriteRowsDTO(); |
|
109 | - if ($event !== null) { |
|
110 | - $this->eventDispatcher->dispatch(ConstEventsNames::WRITE, $event); |
|
111 | - } |
|
108 | + $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeWriteRowsDTO(); |
|
109 | + if ($event !== null) { |
|
110 | + $this->eventDispatcher->dispatch(ConstEventsNames::WRITE, $event); |
|
111 | + } |
|
112 | 112 | } elseif (in_array($eventInfo->getType(), [ConstEventType::DELETE_ROWS_EVENT_V1, ConstEventType::DELETE_ROWS_EVENT_V2], true)) { |
113 | - $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeDeleteRowsDTO(); |
|
114 | - if ($event !== null) { |
|
115 | - $this->eventDispatcher->dispatch(ConstEventsNames::DELETE, $event); |
|
116 | - } |
|
113 | + $event = $this->rowEventService->makeRowEvent($binaryDataReader, $eventInfo)->makeDeleteRowsDTO(); |
|
114 | + if ($event !== null) { |
|
115 | + $this->eventDispatcher->dispatch(ConstEventsNames::DELETE, $event); |
|
116 | + } |
|
117 | 117 | } elseif (ConstEventType::XID_EVENT === $eventInfo->getType()) { |
118 | 118 | $this->eventDispatcher->dispatch(ConstEventsNames::XID, (new XidEvent($eventInfo, $binaryDataReader))->makeXidDTO()); |
119 | 119 | } elseif (ConstEventType::ROTATE_EVENT === $eventInfo->getType()) { |
@@ -352,9 +352,9 @@ |
||
352 | 352 | $values[$name] = $this->getDatetime2($column); |
353 | 353 | } |
354 | 354 | elseif ($column['type'] === ConstFieldType::TIMESTAMP) |
355 | - { |
|
356 | - $values[$name] = date('c', $this->binaryDataReader->readUInt32()); |
|
357 | - } |
|
355 | + { |
|
356 | + $values[$name] = date('c', $this->binaryDataReader->readUInt32()); |
|
357 | + } |
|
358 | 358 | elseif ($column['type'] === ConstFieldType::TIME2) |
359 | 359 | { |
360 | 360 | $values[$name] = $this->getTime2($column); |