Total Complexity | 9 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class ChatEventLocationChanged extends ChatEventAction |
||
15 | { |
||
16 | public const TYPE_NAME = 'chatEventLocationChanged'; |
||
17 | |||
18 | /** |
||
19 | * Previous location; may be null. |
||
20 | */ |
||
21 | protected ?ChatLocation $oldLocation; |
||
22 | |||
23 | /** |
||
24 | * New location; may be null. |
||
25 | */ |
||
26 | protected ?ChatLocation $newLocation; |
||
27 | |||
28 | public function __construct(?ChatLocation $oldLocation, ?ChatLocation $newLocation) |
||
29 | { |
||
30 | parent::__construct(); |
||
31 | |||
32 | $this->oldLocation = $oldLocation; |
||
33 | $this->newLocation = $newLocation; |
||
34 | } |
||
35 | |||
36 | public static function fromArray(array $array): ChatEventLocationChanged |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | public function typeSerialize(): array |
||
50 | ]; |
||
51 | } |
||
52 | |||
53 | public function getOldLocation(): ?ChatLocation |
||
56 | } |
||
57 | |||
58 | public function getNewLocation(): ?ChatLocation |
||
63 |