@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | public int $duration; |
26 | 26 | |
27 | 27 | /** Optional. MIME type of the file as defined by sender */ |
28 | - public null|string $mime_type = null; |
|
28 | + public null | string $mime_type = null; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
32 | 32 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
33 | 33 | * integer or double-precision float type are safe for storing this value. |
34 | 34 | */ |
35 | - public null|int $file_size = null; |
|
35 | + public null | int $file_size = null; |
|
36 | 36 | |
37 | 37 | |
38 | - public function __construct(stdClass|null $object = null) { |
|
38 | + public function __construct(stdClass | null $object = null) { |
|
39 | 39 | if ($object != null) { |
40 | 40 | parent::__construct($object, self::subs); |
41 | 41 | } |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @return bool|string string will be returned when destination doesn't set |
58 | 58 | */ |
59 | - public function download(string|null $destination = null): bool|string { |
|
60 | - return telegram::downloadFile($destination ?? 'unknown.ogg',$this->file_id); |
|
59 | + public function download(string | null $destination = null): bool | string { |
|
60 | + return telegram::downloadFile($destination ?? 'unknown.ogg', $this->file_id); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -22,23 +22,23 @@ discard block |
||
22 | 22 | public string $file_unique_id; |
23 | 23 | |
24 | 24 | /** Optional. Document thumbnail as defined by sender */ |
25 | - public null|photoSize $thumbnail = null; |
|
25 | + public null | photoSize $thumbnail = null; |
|
26 | 26 | |
27 | 27 | /** Optional. Original filename as defined by sender */ |
28 | - public null|string $file_name = null; |
|
28 | + public null | string $file_name = null; |
|
29 | 29 | |
30 | 30 | /** Optional. MIME type of the file as defined by sender */ |
31 | - public null|string $mime_type = null; |
|
31 | + public null | string $mime_type = null; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
35 | 35 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
36 | 36 | * integer or double-precision float type are safe for storing this value. |
37 | 37 | */ |
38 | - public null|int $file_size = null; |
|
38 | + public null | int $file_size = null; |
|
39 | 39 | |
40 | 40 | |
41 | - public function __construct(stdClass|null $object = null) { |
|
41 | + public function __construct(stdClass | null $object = null) { |
|
42 | 42 | if ($object != null) { |
43 | 43 | parent::__construct($object, self::subs); |
44 | 44 | } |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return bool|string string will be returned when destination doesn't set |
61 | 61 | */ |
62 | - public function download(string|null $destination = null): bool|string { |
|
63 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.txt',$this->file_id); |
|
62 | + public function download(string | null $destination = null): bool | string { |
|
63 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.txt', $this->file_id); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | public string $invoice_payload; |
33 | 33 | |
34 | 34 | /** Optional. Identifier of the shipping option chosen by the user */ |
35 | - public null|string $shipping_option_id = null; |
|
35 | + public null | string $shipping_option_id = null; |
|
36 | 36 | |
37 | 37 | /** Optional. Order information provided by the user */ |
38 | - public null|orderInfo $order_info = null; |
|
38 | + public null | orderInfo $order_info = null; |
|
39 | 39 | |
40 | 40 | |
41 | - public function __construct(stdClass|null $object = null) { |
|
41 | + public function __construct(stdClass | null $object = null) { |
|
42 | 42 | if ($object != null) { |
43 | 43 | parent::__construct($object, self::subs); |
44 | 44 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @return responseError|bool |
58 | 58 | */ |
59 | - public function answer (bool $ok, string|null $error_message = null, bool $answer = null): responseError|bool { |
|
59 | + public function answer(bool $ok, string | null $error_message = null, bool $answer = null): responseError | bool { |
|
60 | 60 | return telegram::answerPreCheckoutQuery($ok, $this->id, $error_message, answer: $answer); |
61 | 61 | } |
62 | 62 | } |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
32 | 32 | * integer or double-precision float type are safe for storing this value. |
33 | 33 | */ |
34 | - public null|int $file_size = null; |
|
34 | + public null | int $file_size = null; |
|
35 | 35 | |
36 | 36 | /** Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */ |
37 | - public null|string $file_path = null; |
|
37 | + public null | string $file_path = null; |
|
38 | 38 | |
39 | 39 | |
40 | - public function __construct(stdClass|null $object = null) { |
|
40 | + public function __construct(stdClass | null $object = null) { |
|
41 | 41 | if ($object != null) { |
42 | 42 | parent::__construct($object, self::subs); |
43 | 43 | } |
@@ -51,6 +51,6 @@ discard block |
||
51 | 51 | * @return string |
52 | 52 | */ |
53 | 53 | public function link(): string { |
54 | - return settings::$down_url . '/bot' . settings::$token . '/' . $this->file_path; |
|
54 | + return settings::$down_url.'/bot'.settings::$token.'/'.$this->file_path; |
|
55 | 55 | } |
56 | 56 | } |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | public int $duration; |
29 | 29 | |
30 | 30 | /** Optional. Video thumbnail */ |
31 | - public null|photoSize $thumbnail = null; |
|
31 | + public null | photoSize $thumbnail = 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,8 +55,8 @@ 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 | |
62 | 62 | /** |
@@ -18,25 +18,25 @@ discard block |
||
18 | 18 | public float $latitude; |
19 | 19 | |
20 | 20 | /** Optional. The radius of uncertainty for the location, measured in meters; 0-1500 */ |
21 | - public null|float $horizontal_accuracy = null; |
|
21 | + public null | float $horizontal_accuracy = null; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For |
25 | 25 | * active live locations only. |
26 | 26 | */ |
27 | - public null|int $live_period = null; |
|
27 | + public null | int $live_period = null; |
|
28 | 28 | |
29 | 29 | /** Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. */ |
30 | - public null|int $heading = null; |
|
30 | + public null | int $heading = null; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent |
34 | 34 | * live locations only. |
35 | 35 | */ |
36 | - public null|int $proximity_alert_radius = null; |
|
36 | + public null | int $proximity_alert_radius = null; |
|
37 | 37 | |
38 | 38 | |
39 | - public function __construct(stdClass|null $object = null) { |
|
39 | + public function __construct(stdClass | null $object = null) { |
|
40 | 40 | if ($object != null) { |
41 | 41 | parent::__construct($object, self::subs); |
42 | 42 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @return string |
49 | 49 | */ |
50 | - public function mapLink (): string { |
|
50 | + public function mapLink(): string { |
|
51 | 51 | return "https://www.google.com/maps/search/$this->latitude,$this->longitude"; |
52 | 52 | } |
53 | 53 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public int $chat_id; |
27 | 27 | |
28 | 28 | |
29 | - public function __construct(stdClass|null $object = null) { |
|
29 | + public function __construct(stdClass | null $object = null) { |
|
30 | 30 | if ($object != null) { |
31 | 31 | parent::__construct($object, self::subs); |
32 | 32 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return responseError|chat |
41 | 41 | */ |
42 | - public function getInfo (bool $answer = null): responseError|chat { |
|
42 | + public function getInfo(bool $answer = null): responseError | chat { |
|
43 | 43 | return telegram::getChat($this->chat_id, answer: $answer); |
44 | 44 | } |
45 | 45 | } |
@@ -38,25 +38,25 @@ discard block |
||
38 | 38 | public int $height; |
39 | 39 | |
40 | 40 | /** True, if the sticker is animated */ |
41 | - public null|bool $is_animated = null; |
|
41 | + public null | bool $is_animated = null; |
|
42 | 42 | |
43 | 43 | /** True, if the sticker is a video sticker */ |
44 | - public null|bool $is_video = null; |
|
44 | + public null | bool $is_video = null; |
|
45 | 45 | |
46 | 46 | /** Optional. Sticker thumbnail in the .WEBP or .JPG format */ |
47 | - public null|photoSize $thumbnail = null; |
|
47 | + public null | photoSize $thumbnail = null; |
|
48 | 48 | |
49 | 49 | /** Optional. Emoji associated with the sticker */ |
50 | - public null|string $emoji = null; |
|
50 | + public null | string $emoji = null; |
|
51 | 51 | |
52 | 52 | /** Optional. Name of the sticker set to which the sticker belongs */ |
53 | - public null|string $set_name = null; |
|
53 | + public null | string $set_name = null; |
|
54 | 54 | |
55 | 55 | /** Optional. Premium animation for the sticker, if the sticker is premium */ |
56 | - public null|file $premium_animation = null; |
|
56 | + public null | file $premium_animation = null; |
|
57 | 57 | |
58 | 58 | /** Optional. For mask stickers, the position where the mask should be placed */ |
59 | - public null|maskPosition $mask_position = null; |
|
59 | + public null | maskPosition $mask_position = null; |
|
60 | 60 | |
61 | 61 | /** Optional. For custom emoji stickers, unique identifier of the custom emoji */ |
62 | 62 | public string $custom_emoji_id; |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | public bool $needs_repainting; |
69 | 69 | |
70 | 70 | /** Optional. File size in bytes */ |
71 | - public null|int $file_size = null; |
|
71 | + public null | int $file_size = null; |
|
72 | 72 | |
73 | 73 | |
74 | - public function __construct(stdClass|null $object = null) { |
|
74 | + public function __construct(stdClass | null $object = null) { |
|
75 | 75 | if ($object != null) { |
76 | 76 | parent::__construct($object, self::subs); |
77 | 77 | } |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @return bool|string string will be returned when destination doesn't set |
94 | 94 | */ |
95 | - public function download(string|null $destination = null): bool|string { |
|
96 | - return telegram::downloadFile($destination ?? 'unknown.png',$this->file_id); |
|
95 | + public function download(string | null $destination = null): bool | string { |
|
96 | + return telegram::downloadFile($destination ?? 'unknown.png', $this->file_id); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public int $user_id; |
27 | 27 | |
28 | 28 | |
29 | - public function __construct(stdClass|null $object = null) { |
|
29 | + public function __construct(stdClass | null $object = null) { |
|
30 | 30 | if ($object != null) { |
31 | 31 | parent::__construct($object, self::subs); |
32 | 32 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return responseError|chat |
41 | 41 | */ |
42 | - public function getInfo (bool $answer = null): responseError|chat { |
|
42 | + public function getInfo(bool $answer = null): responseError | chat { |
|
43 | 43 | return telegram::getChat($this->user_id, answer: $answer); |
44 | 44 | } |
45 | 45 | } |