File tree Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,6 @@ public function __construct(object $data)
24
24
$ this ->chat_id = $ value - 2000000000 ;
25
25
}
26
26
27
- if ($ property === "payload " ) {
28
- if (is_object ($ value )) {
29
- $ this ->payload = $ value ;
30
- } elseif (is_string ($ value )) {
31
- $ this ->payload = json_encode ($ value , false );
32
- }
33
- }
34
-
35
27
$ this ->$ property = $ value ;
36
28
}
37
29
});
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ final class MessageEvent
21
21
private int $ peer_id ;
22
22
private int $ user_id ;
23
23
private int $ conversation_message_id ;
24
- private object $ payload ;
24
+ private mixed $ payload ;
25
25
private string $ event_id ;
26
26
27
27
/**
@@ -49,9 +49,9 @@ public function getEventId(): string
49
49
}
50
50
51
51
/**
52
- * @return object|null
52
+ * @return mixed
53
53
*/
54
- public function getPayload (): ? object
54
+ public function getPayload (): mixed
55
55
{
56
56
return $ this ->getField ("payload " );
57
57
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ final class MessageNew
32
32
private array $ attachments ;
33
33
private bool $ important ;
34
34
private object $ geo ;
35
- private object $ payload ;
35
+ private mixed $ payload ;
36
36
private array $ fwd_messages ;
37
37
private object $ reply_message ;
38
38
private object $ action ;
@@ -135,9 +135,9 @@ public function getGeo(): ?object
135
135
}
136
136
137
137
/**
138
- * @return object|null
138
+ * @return mixed
139
139
*/
140
- public function getPayload (): ? object
140
+ public function getPayload (): mixed
141
141
{
142
142
return $ this ->getField ("payload " );
143
143
}
You can’t perform that action at this time.
0 commit comments