@@ -67,7 +67,7 @@ |
||
67 | 67 | public bool $can_manage_topics; |
68 | 68 | |
69 | 69 | |
70 | - public function __construct(stdClass|null $object = null) { |
|
70 | + public function __construct(stdClass | null $object = null) { |
|
71 | 71 | if ($object != null) { |
72 | 72 | parent::__construct($object, self::subs); |
73 | 73 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | /** Keep all of properties which has sub properties */ |
12 | 12 | private const subs = []; |
13 | 13 | |
14 | - public function __construct(stdClass|null $object = null) { |
|
14 | + public function __construct(stdClass | null $object = null) { |
|
15 | 15 | if ($object != null) { |
16 | 16 | parent::__construct($object, self::subs); |
17 | 17 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->$key[$sub_key][] = new ($subs['array']['array'][$key]) ($sub2_value); |
27 | 27 | } |
28 | 28 | } |
29 | - elseif(isset($subs['array'][$key])){ |
|
29 | + elseif (isset($subs['array'][$key])) { |
|
30 | 30 | $this->$key[] = new ($subs['array'][$key]) ($sub_value); |
31 | 31 | } |
32 | 32 | else { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
37 | - else{ |
|
37 | + else { |
|
38 | 38 | $this->$key = $value; |
39 | 39 | if (ucfirst($key) === basename(get_class($this)).'_id') { |
40 | 40 | $this->{'id'} = $value; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function __call(string $name, array $arguments) { |
49 | 49 | $name = strtolower($name); |
50 | 50 | if (str_starts_with($name, 'set')) { |
51 | - $name = substr($name,3); |
|
51 | + $name = substr($name, 3); |
|
52 | 52 | if (isset($arguments[0])) { |
53 | 53 | $this->$name = $arguments[0]; |
54 | 54 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | public bool $can_manage_topics; |
68 | 68 | |
69 | 69 | |
70 | - public function __construct(stdClass|null $object = null) { |
|
70 | + public function __construct(stdClass | null $object = null) { |
|
71 | 71 | if ($object != null) { |
72 | 72 | parent::__construct($object, self::subs); |
73 | 73 | } |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | public int $duration; |
29 | 29 | |
30 | 30 | /** Optional. Video thumbnail */ |
31 | - public null|photoSize $thumb = null; |
|
31 | + public null | photoSize $thumb = null; |
|
32 | 32 | |
33 | 33 | /** Optional. File size in bytes */ |
34 | - public null|int $file_size = null; |
|
34 | + public null | int $file_size = null; |
|
35 | 35 | |
36 | 36 | |
37 | - public function __construct(stdClass|null $object = null) { |
|
37 | + public function __construct(stdClass | null $object = null) { |
|
38 | 38 | if ($object != null) { |
39 | 39 | parent::__construct($object, self::subs); |
40 | 40 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @return bool|string string will be returned when destination doesn't set |
57 | 57 | */ |
58 | - public function download(string|null $destination = null): bool|string { |
|
59 | - return telegram::downloadFile($destination ?? 'unknown.mp4',$this->file_id); |
|
58 | + public function download(string | null $destination = null): bool | string { |
|
59 | + return telegram::downloadFile($destination ?? 'unknown.mp4', $this->file_id); |
|
60 | 60 | } |
61 | 61 | } |
@@ -18,10 +18,10 @@ |
||
18 | 18 | public int $icon_color; |
19 | 19 | |
20 | 20 | /** Optional. Unique identifier of the custom emoji shown as the topic icon */ |
21 | - public null|string $icon_custom_emoji_id = null; |
|
21 | + public null | string $icon_custom_emoji_id = null; |
|
22 | 22 | |
23 | 23 | |
24 | - public function __construct(stdClass|null $object = null) { |
|
24 | + public function __construct(stdClass | null $object = null) { |
|
25 | 25 | if ($object != null) { |
26 | 26 | parent::__construct($object, self::subs); |
27 | 27 | } |
@@ -25,13 +25,13 @@ |
||
25 | 25 | public int $date; |
26 | 26 | |
27 | 27 | /** Optional. Bio of the user. */ |
28 | - public null|string $bio = null; |
|
28 | + public null | string $bio = null; |
|
29 | 29 | |
30 | 30 | /** Optional. Chat invite link that was used by the user to send the join request */ |
31 | - public null|chatInviteLink $invite_link = null; |
|
31 | + public null | chatInviteLink $invite_link = null; |
|
32 | 32 | |
33 | 33 | |
34 | - public function __construct(stdClass|null $object = null) { |
|
34 | + public function __construct(stdClass | null $object = null) { |
|
35 | 35 | if ($object != null) { |
36 | 36 | parent::__construct($object, self::subs); |
37 | 37 | } |
@@ -31,23 +31,23 @@ discard block |
||
31 | 31 | public int $duration; |
32 | 32 | |
33 | 33 | /** Optional. Animation thumbnail as defined by sender */ |
34 | - public null|photoSize $thumb = null; |
|
34 | + public null | photoSize $thumb = null; |
|
35 | 35 | |
36 | 36 | /** Optional. Original animation filename as defined by sender */ |
37 | - public null|string $file_name = null; |
|
37 | + public null | string $file_name = null; |
|
38 | 38 | |
39 | 39 | /** Optional. MIME type of the file as defined by sender */ |
40 | - public null|string $mime_type = null; |
|
40 | + public null | string $mime_type = null; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
44 | 44 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
45 | 45 | * integer or double-precision float type are safe for storing this value. |
46 | 46 | */ |
47 | - public null|int $file_size = null; |
|
47 | + public null | int $file_size = null; |
|
48 | 48 | |
49 | 49 | |
50 | - public function __construct(stdClass|null $object = null) { |
|
50 | + public function __construct(stdClass | null $object = null) { |
|
51 | 51 | if ($object != null) { |
52 | 52 | parent::__construct($object, self::subs); |
53 | 53 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return bool|string string will be returned when destination doesn't set |
70 | 70 | */ |
71 | - public function download(string|null $destination = null): bool|string { |
|
72 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif',$this->file_id); |
|
71 | + public function download(string | null $destination = null): bool | string { |
|
72 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif', $this->file_id); |
|
73 | 73 | } |
74 | 74 | } |
@@ -32,19 +32,19 @@ |
||
32 | 32 | * edited to include current high scores for the game when the bot calls setGameScore, or manually edited using |
33 | 33 | * editMessageText. 0-4096 characters. |
34 | 34 | */ |
35 | - public null|string $text = null; |
|
35 | + public null | string $text = null; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc. |
39 | 39 | * @var messageEntity[] |
40 | 40 | */ |
41 | - public null|array $text_entities = null; |
|
41 | + public null | array $text_entities = null; |
|
42 | 42 | |
43 | 43 | /** Optional. Animation that will be displayed in the game message in chats. Upload via BotFather */ |
44 | - public null|animation $animation = null; |
|
44 | + public null | animation $animation = null; |
|
45 | 45 | |
46 | 46 | |
47 | - public function __construct(stdClass|null $object = null) { |
|
47 | + public function __construct(stdClass | null $object = null) { |
|
48 | 48 | if ($object != null) { |
49 | 49 | parent::__construct($object, self::subs); |
50 | 50 | } |