@@ -21,7 +21,7 @@ |
||
21 | 21 | public int $score; |
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 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the |
53 | 53 | * thumbnail was uploaded using multipart/form-data under <file_attach_name>. |
54 | 54 | */ |
55 | - public CURLFile|string $thumb; |
|
55 | + public CURLFile | string $thumb; |
|
56 | 56 | |
57 | 57 | /** `video` and `animation` only. width */ |
58 | 58 | public int $width; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public bool $disable_content_type_detection; |
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 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | public string $custom_emoji_id; |
50 | 50 | |
51 | 51 | |
52 | - public function __construct(stdClass|null $object = null) { |
|
52 | + public function __construct(stdClass | null $object = null) { |
|
53 | 53 | if ($object != null) { |
54 | 54 | parent::__construct($object, self::subs); |
55 | 55 | } |
@@ -9,4 +9,4 @@ |
||
9 | 9 | * |
10 | 10 | * @todo make it usefully (it's not called at all) |
11 | 11 | */ |
12 | -class telegramException extends Exception{} |
|
13 | 12 | \ No newline at end of file |
13 | +class telegramException extends Exception {} |
|
14 | 14 | \ No newline at end of file |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | if (!tools::isTelegram($ip ?? '')) { |
44 | - logger::write('not authorized access denied. IP : '. $ip ?? 'unknown',loggerTypes::WARNING); |
|
44 | + logger::write('not authorized access denied. IP : '.$ip ?? 'unknown', loggerTypes::WARNING); |
|
45 | 45 | BPT::exit(); |
46 | 46 | } |
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
50 | - protected static function processUpdate(string|stdClass|update $update = null): void { |
|
50 | + protected static function processUpdate(string | stdClass | update $update = null): void { |
|
51 | 51 | if (!is_object($update)) { |
52 | 52 | $update = json_decode($update ?? file_get_contents("php://input")); |
53 | 53 | if (!$update) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | - if (!is_a($update,'update')) { |
|
58 | + if (!is_a($update, 'update')) { |
|
59 | 59 | $update = new update($update); |
60 | 60 | } |
61 | 61 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | db::save(); |
67 | 67 | } |
68 | 68 | |
69 | - protected static function setMessageExtra (update &$update): void { |
|
69 | + protected static function setMessageExtra(update & $update): void { |
|
70 | 70 | if ((isset($update->message) && isset($update->message->text)) || (isset($update->edited_message) && isset($update->edited_message->text))) { |
71 | 71 | $type = isset($update->message) ? 'message' : 'edited_message'; |
72 | 72 | $text = &$update->$type->text; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | BPT::$handler->something_else(BPT::$update); |
140 | 140 | } |
141 | 141 | else { |
142 | - logger::write('Update received but handlers does not set',loggerTypes::WARNING); |
|
142 | + logger::write('Update received but handlers does not set', loggerTypes::WARNING); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @internal Only for BPT self usage , Don't use it in your source! |
19 | 19 | */ |
20 | - public static function init (): void { |
|
20 | + public static function init(): void { |
|
21 | 21 | if (!empty(settings::$db)) { |
22 | 22 | if (!isset(settings::$db['type'])) { |
23 | 23 | settings::$db['type'] = dbTypes::JSON; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public string $big_file_unique_id; |
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 | } |
@@ -59,7 +59,7 @@ 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 $big = true): bool|string { |
|
63 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4',$big ? $this->big_file_id : $this->small_file_id); |
|
62 | + public function download(string | null $destination = null, bool $big = true): bool | string { |
|
63 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $big ? $this->big_file_id : $this->small_file_id); |
|
64 | 64 | } |
65 | 65 | } |
@@ -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 | } |
@@ -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 | } |