| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class XidDTO extends EventDTO |
||
| 10 | { |
||
| 11 | private $type = ConstEventsNames::XID; |
||
| 12 | private $xid; |
||
| 13 | |||
| 14 | 6 | public function __construct( |
|
| 15 | EventInfo $eventInfo, |
||
| 16 | string $xid |
||
| 17 | ) { |
||
| 18 | 6 | parent::__construct($eventInfo); |
|
| 19 | |||
| 20 | 6 | $this->xid = $xid; |
|
| 21 | } |
||
| 22 | |||
| 23 | public function getXid(): string |
||
| 24 | { |
||
| 25 | return $this->xid; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function __toString(): string |
||
| 29 | { |
||
| 30 | return PHP_EOL . |
||
| 31 | '=== Event ' . $this->getType() . ' === ' . PHP_EOL . |
||
| 32 | 'Date: ' . $this->eventInfo->getDateTime() . PHP_EOL . |
||
| 33 | 'Log position: ' . $this->eventInfo->getPos() . PHP_EOL . |
||
| 34 | 'Event size: ' . $this->eventInfo->getSize() . PHP_EOL . |
||
| 35 | 'Transaction ID: ' . $this->xid . PHP_EOL; |
||
| 36 | } |
||
| 37 | |||
| 38 | 6 | public function getType(): string |
|
| 39 | { |
||
| 40 | 6 | return $this->type; |
|
| 41 | } |
||
| 42 | |||
| 43 | public function jsonSerialize() |
||
| 46 | } |
||
| 47 | } |