| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 91.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class RotateEvent extends EventCommon |
||
| 13 | { |
||
| 14 | 1 | public function makeRotateEventDTO(): RotateDTO |
|
| 15 | { |
||
| 16 | 1 | $binFilePos = (int)$this->binaryDataReader->readUInt64(); |
|
| 17 | 1 | $binFileName = $this->binaryDataReader->read( |
|
| 18 | 1 | $this->eventInfo->getSizeNoHeader() - $this->getSizeToRemoveByVersion() |
|
| 19 | ); |
||
| 20 | |||
| 21 | 1 | $this->eventInfo->getBinLogCurrent()->setBinLogPosition($binFilePos); |
|
| 22 | 1 | $this->eventInfo->getBinLogCurrent()->setBinFileName($binFileName); |
|
| 23 | |||
| 24 | 1 | return new RotateDTO( |
|
| 25 | 1 | $this->eventInfo, |
|
| 26 | $binFilePos, |
||
| 27 | $binFileName |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | 1 | private function getSizeToRemoveByVersion(): int |
|
| 38 | } |
||
| 39 | } |