| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 94.74% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class RotateEvent extends EventCommon |
||
| 14 | { |
||
| 15 | private $binLogServerInfo; |
||
| 16 | |||
| 17 | 1 | public function __construct( |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public function makeRotateEventDTO(): RotateDTO |
|
| 27 | { |
||
| 28 | 1 | $binFilePos = (int)$this->binaryDataReader->readUInt64(); |
|
| 29 | 1 | $binFileName = $this->binaryDataReader->read( |
|
| 30 | 1 | $this->eventInfo->getSizeNoHeader() - $this->getSizeToRemoveByVersion() |
|
| 31 | 1 | ); |
|
| 32 | |||
| 33 | 1 | $this->eventInfo->getBinLogCurrent()->setBinLogPosition($binFilePos); |
|
| 34 | 1 | $this->eventInfo->getBinLogCurrent()->setBinFileName($binFileName); |
|
| 35 | |||
| 36 | 1 | return new RotateDTO( |
|
| 37 | 1 | $this->eventInfo, |
|
| 38 | 1 | $binFilePos, |
|
| 39 | 1 | $binFileName |
|
| 40 | 1 | ); |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | private function getSizeToRemoveByVersion(): int |
|
| 50 | } |
||
| 51 | } |
||
| 52 |