Passed
Push — main ( 41e5bc...ca9ae3 )
by Miaad
01:45
created
src/types/inputSticker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending
19 19
      * Files »
20 20
      */
21
-    public string|CURLFile $sticker;
21
+    public string | CURLFile $sticker;
22 22
 
23 23
     /**
24 24
      * List of 1-20 emoji associated with the sticker
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public array $keywords;
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
         }
Please login to merge, or discard this patch.
src/types/audio.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,29 +25,29 @@  discard block
 block discarded – undo
25 25
     public int $duration;
26 26
 
27 27
     /** Optional. Performer of the audio as defined by sender or by audio tags */
28
-    public null|string $performer = null;
28
+    public null | string $performer = null;
29 29
 
30 30
     /** Optional. Title of the audio as defined by sender or by audio tags */
31
-    public null|string $title = null;
31
+    public null | string $title = null;
32 32
 
33 33
     /** Optional. Original filename as defined by sender */
34
-    public null|string $file_name = null;
34
+    public null | string $file_name = null;
35 35
 
36 36
     /** Optional. MIME type of the file as defined by sender */
37
-    public null|string $mime_type = null;
37
+    public null | string $mime_type = null;
38 38
 
39 39
     /**
40 40
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
41 41
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
42 42
      * integer or double-precision float type are safe for storing this value.
43 43
      */
44
-    public null|int $file_size = null;
44
+    public null | int $file_size = null;
45 45
 
46 46
     /** Optional. Thumbnail of the album cover to which the music file belongs */
47
-    public null|photoSize $thumbnail = null;
47
+    public null | photoSize $thumbnail = 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,8 +68,8 @@  discard block
 block discarded – undo
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.mp3',$this->file_id);
71
+    public function download(string | null $destination = null): bool | string {
72
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3', $this->file_id);
73 73
     }
74 74
 
75 75
     public function link(): string {
Please login to merge, or discard this patch.
src/types/video.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@  discard block
 block discarded – undo
31 31
     public int $duration;
32 32
 
33 33
     /** Optional. Video thumbnail */
34
-    public null|photoSize $thumbnail = null;
34
+    public null | photoSize $thumbnail = null;
35 35
 
36 36
     /** Optional. Original 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,8 +68,8 @@  discard block
 block discarded – undo
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.mp4',$this->file_id);
71
+    public function download(string | null $destination = null): bool | string {
72
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $this->file_id);
73 73
     }
74 74
 
75 75
     public function link(): string {
Please login to merge, or discard this patch.
src/types/stickerSet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
     public string $sticker_type;
22 22
 
23 23
     /** True, if the sticker set contains animated stickers */
24
-    public null|bool $is_animated = null;
24
+    public null | bool $is_animated = null;
25 25
 
26 26
     /** True, if the sticker set contains video stickers */
27
-    public null|bool $is_video = null;
27
+    public null | bool $is_video = null;
28 28
 
29 29
     /** Deprecated use sticker_type instead, True, if the sticker set contains masks */
30
-    public null|bool $contains_masks = null;
30
+    public null | bool $contains_masks = null;
31 31
 
32 32
     /**
33 33
      * List of all set stickers
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     public array $stickers;
37 37
 
38 38
     /** Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
39
-    public null|photoSize $thumbnail = null;
39
+    public null | photoSize $thumbnail = 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
         }
Please login to merge, or discard this patch.
src/types/document.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     public function link(): string {
Please login to merge, or discard this patch.
src/types/botDescription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public string $description;
19 19
 
20 20
 
21
-    public function __construct(stdClass|null $object = null) {
21
+    public function __construct(stdClass | null $object = null) {
22 22
         if ($object != null) {
23 23
             parent::__construct($object, self::subs);
24 24
         }
Please login to merge, or discard this patch.
src/types/sticker.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,34 +38,34 @@  discard block
 block discarded – undo
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
-    public null|string $custom_emoji_id = null;
62
+    public null | string $custom_emoji_id = null;
63 63
 
64 64
     /** Optional. File size in bytes */
65
-    public null|int $file_size = null;
65
+    public null | int $file_size = null;
66 66
 
67 67
 
68
-    public function __construct(stdClass|null $object = null) {
68
+    public function __construct(stdClass | null $object = null) {
69 69
         if ($object != null) {
70 70
             parent::__construct($object, self::subs);
71 71
         }
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return bool|string string will be returned when destination doesn't set
88 88
      */
89
-    public function download(string|null $destination = null): bool|string {
90
-        return telegram::downloadFile($destination ?? 'unknown.png',$this->file_id);
89
+    public function download(string | null $destination = null): bool | string {
90
+        return telegram::downloadFile($destination ?? 'unknown.png', $this->file_id);
91 91
     }
92 92
 
93 93
     public function link(): string {
Please login to merge, or discard this patch.
src/BPT.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -290,13 +290,13 @@  discard block
 block discarded – undo
290 290
  * @method gameHighScore[]|responseError getGameHighScores (int|array|null $user_id = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
291 291
  * @method gameHighScore[]|responseError getGameHigh (int|array|null $user_id = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
292 292
  */
293
-class BPT extends telegram{
293
+class BPT extends telegram {
294 294
     public static update $update;
295 295
 
296 296
     public static BPT $handler;
297 297
 
298 298
 
299
-    public function __construct (array|stdClass $settings) {
299
+    public function __construct(array | stdClass $settings) {
300 300
         static::$handler = &$this;
301 301
         settings::init($settings);
302 302
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
     }
307 307
 
308 308
     #[NoReturn]
309
-    public static function exit (string|null $message = null) {
309
+    public static function exit (string | null $message = null) {
310 310
         die($message ?? "<div style='width:98vw;height:98vh;display:flex;justify-content:center;align-items:center;font-size:25vw'>BPT</div>");
311 311
     }
312 312
 }
Please login to merge, or discard this patch.
src/receiver/multi/exec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * @internal Only for BPT self usage , Don't use it in your source!
19 19
      */
20
-    public static function init(): string|null {
20
+    public static function init(): string | null {
21 21
         return self::getUpdate();
22 22
     }
23 23
 
24
-    private static function getUpdate (): string|null {
24
+    private static function getUpdate(): string | null {
25 25
         $up = glob('*.update');
26 26
         if (!isset($up[0])) {
27
-            logger::write('not authorized access denied. IP : '. $_SERVER['REMOTE_ADDR'] ?? 'unknown',loggerTypes::WARNING);
27
+            logger::write('not authorized access denied. IP : '.$_SERVER['REMOTE_ADDR'] ?? 'unknown', loggerTypes::WARNING);
28 28
             BPT::exit();
29 29
         }
30 30
         $up = end($up);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     }
55 55
 
56 56
     private static function create($file) {
57
-        file_put_contents('receiver.php', '<?php $BPT = file_get_contents("php://input");$id = json_decode($BPT, true)[\'update_id\'];file_put_contents("{$_SERVER[\'REMOTE_ADDR\']}-$id.update",$BPT);exec("php ' . $file . ' > /dev/null &");');
57
+        file_put_contents('receiver.php', '<?php $BPT = file_get_contents("php://input");$id = json_decode($BPT, true)[\'update_id\'];file_put_contents("{$_SERVER[\'REMOTE_ADDR\']}-$id.update",$BPT);exec("php '.$file.' > /dev/null &");');
58 58
     }
59 59
 
60 60
     #[ArrayShape(['url' => "array|string|string[]", 'file' => "string"])]
Please login to merge, or discard this patch.