Total Complexity | 6 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 33.33% |
Changes | 0 |
1 | <?php |
||
9 | class RotateDTO extends EventDTO |
||
10 | { |
||
11 | private $position; |
||
12 | private $nextBinlog; |
||
13 | private $type = ConstEventsNames::ROTATE; |
||
14 | |||
15 | 1 | public function __construct( |
|
16 | EventInfo $eventInfo, |
||
17 | int $position, |
||
18 | string $nextBinlog |
||
19 | ) { |
||
20 | 1 | parent::__construct($eventInfo); |
|
21 | |||
22 | 1 | $this->position = $position; |
|
23 | 1 | $this->nextBinlog = $nextBinlog; |
|
24 | 1 | } |
|
25 | |||
26 | public function getPosition(): int |
||
27 | { |
||
28 | return $this->position; |
||
29 | } |
||
30 | |||
31 | public function getNextBinlog(): string |
||
32 | { |
||
33 | return $this->nextBinlog; |
||
34 | } |
||
35 | |||
36 | 1 | public function getType(): string |
|
37 | { |
||
38 | 1 | return $this->type; |
|
39 | } |
||
40 | |||
41 | public function __toString(): string |
||
50 | } |
||
51 | |||
52 | public function jsonSerialize() |
||
53 | { |
||
54 | return get_object_vars($this); |
||
55 | } |
||
56 | } |