@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | * should be always known for requests sent from official clients and most third-party clients, unless the |
32 | 32 | * request was sent from a secret chat |
33 | 33 | */ |
34 | - public null|string $chat_type = null; |
|
34 | + public null | string $chat_type = null; |
|
35 | 35 | |
36 | 36 | /** Optional. Sender location, only for bots that request user location */ |
37 | - public null|location $location = null; |
|
37 | + public null | location $location = 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 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @return responseError|bool |
58 | 58 | */ |
59 | - public function answer(array $results, int|null $cache_time = null, bool|null $is_personal = null, string|null $next_offset = null, object|array|null $button = null, bool $answer = null): responseError|bool { |
|
59 | + public function answer(array $results, int | null $cache_time = null, bool | null $is_personal = null, string | null $next_offset = null, object | array | null $button = null, bool $answer = null): responseError | bool { |
|
60 | 60 | return telegram::answerInlineQuery(results: $results, inline_query_id: $this->id, cache_time: $cache_time, is_personal: $is_personal, next_offset: $next_offset, button: $button, answer: $answer); |
61 | 61 | } |
62 | 62 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public array $colors; |
34 | 34 | |
35 | 35 | |
36 | - public function __construct(stdClass|null $object = null) { |
|
36 | + public function __construct(stdClass | null $object = null) { |
|
37 | 37 | if ($object != null) { |
38 | 38 | parent::__construct($object, self::subs); |
39 | 39 | } |
@@ -27,10 +27,10 @@ |
||
27 | 27 | public array $stickers; |
28 | 28 | |
29 | 29 | /** Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */ |
30 | - public null|photoSize $thumbnail = null; |
|
30 | + public null | photoSize $thumbnail = null; |
|
31 | 31 | |
32 | 32 | |
33 | - public function __construct(stdClass|null $object = null) { |
|
33 | + public function __construct(stdClass | null $object = null) { |
|
34 | 34 | if ($object != null) { |
35 | 35 | parent::__construct($object, self::subs); |
36 | 36 | } |
@@ -32,13 +32,13 @@ discard block |
||
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 | /** Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */ |
38 | - public null|string $file_path = null; |
|
38 | + public null | string $file_path = 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 | } |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | * @return string |
53 | 53 | */ |
54 | 54 | public function link(): string { |
55 | - return settings::$down_url . '/bot' . settings::$token . '/' . $this->file_path; |
|
55 | + return settings::$down_url.'/bot'.settings::$token.'/'.$this->file_path; |
|
56 | 56 | } |
57 | 57 | |
58 | - public function typedSize (int $precision = 2, bool $space_between = true): string { |
|
58 | + public function typedSize(int $precision = 2, bool $space_between = true): string { |
|
59 | 59 | return tools::byteFormat($this->file_id, $precision, $space_between); |
60 | 60 | } |
61 | 61 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public array $message_ids; |
28 | 28 | |
29 | 29 | |
30 | - public function __construct(stdClass|null $object = null) { |
|
30 | + public function __construct(stdClass | null $object = null) { |
|
31 | 31 | if ($object != null) { |
32 | 32 | parent::__construct($object, self::subs); |
33 | 33 | } |
@@ -12,16 +12,16 @@ |
||
12 | 12 | private const subs = ['sticker' => 'BPT\types\sticker']; |
13 | 13 | |
14 | 14 | /** Optional. Title text of the business intro */ |
15 | - public null|string $title = null; |
|
15 | + public null | string $title = null; |
|
16 | 16 | |
17 | 17 | /** Optional. Message text of the business intro */ |
18 | - public null|string $message = null; |
|
18 | + public null | string $message = null; |
|
19 | 19 | |
20 | 20 | /** Optional. Sticker of the business intro */ |
21 | - public null|sticker $sticker = null; |
|
21 | + public null | sticker $sticker = 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 | } |
@@ -23,23 +23,23 @@ discard block |
||
23 | 23 | public string $file_unique_id; |
24 | 24 | |
25 | 25 | /** Optional. Document thumbnail as defined by sender */ |
26 | - public null|photoSize $thumbnail = null; |
|
26 | + public null | photoSize $thumbnail = null; |
|
27 | 27 | |
28 | 28 | /** Optional. Original filename as defined by sender */ |
29 | - public null|string $file_name = null; |
|
29 | + public null | string $file_name = null; |
|
30 | 30 | |
31 | 31 | /** Optional. MIME type of the file as defined by sender */ |
32 | - public null|string $mime_type = null; |
|
32 | + public null | string $mime_type = null; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
36 | 36 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
37 | 37 | * integer or double-precision float type are safe for storing this value. |
38 | 38 | */ |
39 | - public null|int $file_size = null; |
|
39 | + public null | int $file_size = null; |
|
40 | 40 | |
41 | 41 | |
42 | - public function __construct(stdClass|null $object = null) { |
|
42 | + public function __construct(stdClass | null $object = null) { |
|
43 | 43 | if ($object != null) { |
44 | 44 | parent::__construct($object, self::subs); |
45 | 45 | } |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @return bool|string string will be returned when destination doesn't set |
62 | 62 | */ |
63 | - public function download(string|null $destination = null): bool|string { |
|
64 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.txt',$this->file_id); |
|
63 | + public function download(string | null $destination = null): bool | string { |
|
64 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.txt', $this->file_id); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return telegram::fileLink($this->file_id); |
76 | 76 | } |
77 | 77 | |
78 | - public function typedSize (int $precision = 2, bool $space_between = true): string { |
|
78 | + public function typedSize(int $precision = 2, bool $space_between = true): string { |
|
79 | 79 | return tools::byteFormat($this->file_id, $precision, $space_between); |
80 | 80 | } |
81 | 81 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | /** Number of boosts added by the user */ |
15 | 15 | public int $boost_count; |
16 | 16 | |
17 | - public function __construct(stdClass|null $object = null) { |
|
17 | + public function __construct(stdClass | null $object = null) { |
|
18 | 18 | if ($object != null) { |
19 | 19 | parent::__construct($object, self::subs); |
20 | 20 | } |
@@ -12,31 +12,31 @@ |
||
12 | 12 | private const subs = []; |
13 | 13 | |
14 | 14 | /** Optional. True, if the link preview is disabled */ |
15 | - public null|bool $is_disabled = null; |
|
15 | + public null | bool $is_disabled = null; |
|
16 | 16 | |
17 | 17 | /** Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used */ |
18 | - public null|string $url = null; |
|
18 | + public null | string $url = null; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly |
22 | 22 | * specified or media size change isn't supported for the preview |
23 | 23 | */ |
24 | - public null|bool $prefer_small_media = null; |
|
24 | + public null | bool $prefer_small_media = null; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't |
28 | 28 | * explicitly specified or media size change isn't supported for the preview |
29 | 29 | */ |
30 | - public null|bool $prefer_large_media = null; |
|
30 | + public null | bool $prefer_large_media = null; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be |
34 | 34 | * shown below the message text |
35 | 35 | */ |
36 | - public null|bool $show_above_text = null; |
|
36 | + public null | bool $show_above_text = 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 | } |