diff --git a/src/Event/EventBuilder.php b/src/Event/EventBuilder.php index f164c4f..7b5a381 100644 --- a/src/Event/EventBuilder.php +++ b/src/Event/EventBuilder.php @@ -174,13 +174,14 @@ public function makeUpdateRecord(): ?EventInterface $beforeBinaryData = $this->eventBinaryData->read($columnsBinarySize); $afterBinaryData = $this->eventBinaryData->read($columnsBinarySize); - $values = []; + $values = [ + 'before' => [], + 'after' => [], + ]; while (!$this->eventBinaryData->isComplete($this->eventInfo->getSizeNoHeader())) { - $values[] = [ - 'before' => $this->getColumnData($beforeBinaryData), - 'after' => $this->getColumnData($afterBinaryData) - ]; + $values['before'] = $this->getColumnData($beforeBinaryData); + $values['after'] = $this->getColumnData($afterBinaryData); } return new Update( @@ -310,7 +311,7 @@ protected function getValues(): array $values = []; while (!$this->eventBinaryData->isComplete($this->eventInfo->getSizeNoHeader())) { - $values[] = $this->getColumnData($binaryData); + $values = $this->getColumnData($binaryData); } return $values;