@@ -32,23 +32,23 @@ discard block |
||
32 | 32 | public int $duration; |
33 | 33 | |
34 | 34 | /** Optional. Video thumbnail */ |
35 | - public null|photoSize $thumbnail = null; |
|
35 | + public null | photoSize $thumbnail = null; |
|
36 | 36 | |
37 | 37 | /** Optional. Original filename as defined by sender */ |
38 | - public null|string $file_name = null; |
|
38 | + public null | string $file_name = null; |
|
39 | 39 | |
40 | 40 | /** Optional. MIME type of the file as defined by sender */ |
41 | - public null|string $mime_type = null; |
|
41 | + public null | string $mime_type = null; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
45 | 45 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
46 | 46 | * integer or double-precision float type are safe for storing this value. |
47 | 47 | */ |
48 | - public null|int $file_size = null; |
|
48 | + public null | int $file_size = null; |
|
49 | 49 | |
50 | 50 | |
51 | - public function __construct(stdClass|null $object = null) { |
|
51 | + public function __construct(stdClass | null $object = null) { |
|
52 | 52 | if ($object != null) { |
53 | 53 | parent::__construct($object, self::subs); |
54 | 54 | } |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return bool|string string will be returned when destination doesn't set |
71 | 71 | */ |
72 | - public function download(string|null $destination = null): bool|string { |
|
73 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4',$this->file_id); |
|
72 | + public function download(string | null $destination = null): bool | string { |
|
73 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $this->file_id); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return telegram::fileLink($this->file_id); |
85 | 85 | } |
86 | 86 | |
87 | - public function typedSize (int $precision = 2, bool $space_between = true): string { |
|
87 | + public function typedSize(int $precision = 2, bool $space_between = true): string { |
|
88 | 88 | return tools::byteFormat($this->file_id, $precision, $space_between); |
89 | 89 | } |
90 | 90 | } |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | * “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and |
29 | 29 | * “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. |
30 | 30 | */ |
31 | - public null|string $data = null; |
|
31 | + public null | string $data = null; |
|
32 | 32 | |
33 | 33 | /** Optional. User's verified phone number, available only for “phone_number” type */ |
34 | - public null|string $phone_number = null; |
|
34 | + public null | string $phone_number = null; |
|
35 | 35 | |
36 | 36 | /** Optional. User's verified email address, available only for “email” type */ |
37 | - public null|string $email = null; |
|
37 | + public null | string $email = null; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Optional. Array of encrypted files with documents provided by the user; available only for “utility_bill”, |
@@ -42,28 +42,28 @@ discard block |
||
42 | 42 | * types. Files can be decrypted and verified using the accompanying EncryptedCredentials. |
43 | 43 | * @var passportFile[] |
44 | 44 | */ |
45 | - public null|array $files = null; |
|
45 | + public null | array $files = null; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * Optional. Encrypted file with the front side of the document, provided by the user; available only for |
49 | 49 | * “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be |
50 | 50 | * decrypted and verified using the accompanying EncryptedCredentials. |
51 | 51 | */ |
52 | - public null|passportFile $front_side = null; |
|
52 | + public null | passportFile $front_side = null; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Optional. Encrypted file with the reverse side of the document, provided by the user; available only for |
56 | 56 | * “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying |
57 | 57 | * EncryptedCredentials. |
58 | 58 | */ |
59 | - public null|passportFile $reverse_side = null; |
|
59 | + public null | passportFile $reverse_side = null; |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if |
63 | 63 | * requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file |
64 | 64 | * can be decrypted and verified using the accompanying EncryptedCredentials. |
65 | 65 | */ |
66 | - public null|passportFile $selfie = null; |
|
66 | + public null | passportFile $selfie = null; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Optional. Array of encrypted files with translated versions of documents provided by the user; available if |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | * EncryptedCredentials. |
74 | 74 | * @var passportFile[] |
75 | 75 | */ |
76 | - public null|array $translation = null; |
|
76 | + public null | array $translation = null; |
|
77 | 77 | |
78 | 78 | /** Base64-encoded element hash for using in PassportElementErrorUnspecified */ |
79 | 79 | public string $hash; |
80 | 80 | |
81 | 81 | |
82 | - public function __construct(stdClass|null $object = null) { |
|
82 | + public function __construct(stdClass | null $object = null) { |
|
83 | 83 | if ($object != null) { |
84 | 84 | parent::__construct($object, self::subs); |
85 | 85 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public backgroundType $type; |
18 | 18 | |
19 | 19 | |
20 | - public function __construct(stdClass|null $object = null) { |
|
20 | + public function __construct(stdClass | null $object = null) { |
|
21 | 21 | if ($object != null) { |
22 | 22 | parent::__construct($object, self::subs); |
23 | 23 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public int $closing_minute; |
25 | 25 | |
26 | 26 | |
27 | - public function __construct(stdClass|null $object = null) { |
|
27 | + public function __construct(stdClass | null $object = null) { |
|
28 | 28 | if ($object != null) { |
29 | 29 | parent::__construct($object, self::subs); |
30 | 30 | } |
@@ -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 | } |