Passed
Push — main ( bfb9d3...b0527a )
by Miaad
01:30
created
constants/maskPositionPoint.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
  * Mask positions point which you can use in Sticker
7 7
  */
8 8
 class maskPositionPoint {
9
-	public const FOREHEAD = 'forehead';
10
-	public const EYES = 'eyes';
11
-	public const MOUTH = 'mouth';
12
-	public const CHIN = 'chin';
9
+    public const FOREHEAD = 'forehead';
10
+    public const EYES = 'eyes';
11
+    public const MOUTH = 'mouth';
12
+    public const CHIN = 'chin';
13 13
 }
Please login to merge, or discard this patch.
constants/telegramLimits.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
  * types of message entity
7 7
  */
8 8
 class telegramLimits {
9
-	/** Download file limit in Byte. (20 MB). For the moment, bots can download files of up to 20MB in size. */
10
-	public const DOWNLOAD = '20971520';
9
+    /** Download file limit in Byte. (20 MB). For the moment, bots can download files of up to 20MB in size. */
10
+    public const DOWNLOAD = '20971520';
11 11
 
12
-	/** Upload file limit in Byte. (50 MB) */
13
-	public const UPLOAD = '52428800';
12
+    /** Upload file limit in Byte. (50 MB) */
13
+    public const UPLOAD = '52428800';
14 14
 
15
-	/** Caption max characters length */
16
-	public const CAPTION_LENGTH = '1024';
15
+    /** Caption max characters length */
16
+    public const CAPTION_LENGTH = '1024';
17 17
 
18
-	/** Text max characters length */
19
-	public const TEXT_LENGTH = '4096';
18
+    /** Text max characters length */
19
+    public const TEXT_LENGTH = '4096';
20 20
 
21
-	/** Minimum period in seconds for which the location will be updated (1 minute) */
22
-	public const MIN_LIVE_PERIOD = '60';
21
+    /** Minimum period in seconds for which the location will be updated (1 minute) */
22
+    public const MIN_LIVE_PERIOD = '60';
23 23
 
24
-	/** Maximum period in seconds for which the location will be updated (24 hours) */
25
-	public const MAX_LIVE_PERIOD = '86400';
24
+    /** Maximum period in seconds for which the location will be updated (24 hours) */
25
+    public const MAX_LIVE_PERIOD = '86400';
26 26
 
27
-	/** Maximum poll question length */
28
-	public const POLL_QUESTION_LENGTH = '300';
27
+    /** Maximum poll question length */
28
+    public const POLL_QUESTION_LENGTH = '300';
29 29
 }
Please login to merge, or discard this patch.
db/db.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use mysqli;
6 6
 
7 7
 class db {
8
-    public static function init (array|mysqli $db) {
8
+    public static function init(array | mysqli $db) {
9 9
 
10 10
     }
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
api/request.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -225,18 +225,18 @@  discard block
 block discarded – undo
225 225
     ];
226 226
 
227 227
 
228
-    public static function __callStatic (string $name, array $arguments) {
228
+    public static function __callStatic(string $name, array $arguments) {
229 229
         if ($action = self::methodAction($name)) {
230
-            self::keysName($action,$arguments);
231
-            self::readyFile($action,$arguments);
230
+            self::keysName($action, $arguments);
231
+            self::readyFile($action, $arguments);
232 232
             print_r($arguments);
233 233
         }
234 234
         else {
235
-            logger::write("$name method is not supported",'error');
235
+            logger::write("$name method is not supported", 'error');
236 236
         }
237 237
     }
238 238
 
239
-    private static function keysName (string $name, array &$arguments) {
239
+    private static function keysName(string $name, array &$arguments) {
240 240
         foreach ($arguments as $key => $argument) {
241 241
             if (is_numeric($key) && isset(self::METHODS_KEYS[$name][$key])) {
242 242
                 $arguments[self::METHODS_KEYS[$name][$key]] = $argument;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         }
246 246
     }
247 247
 
248
-    private static function methodAction(string $name): string|false {
248
+    private static function methodAction(string $name): string | false {
249 249
         return self::METHODS_ACTION[strtolower($name)] ?? false;
250 250
     }
251 251
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         }
267 267
     }
268 268
 
269
-    private static function methodFile(string $name): array|false {
269
+    private static function methodFile(string $name): array | false {
270 270
         return self::METHODS_WITH_FILE[$name] ?? false;
271 271
     }
272 272
 }
273 273
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -230,8 +230,7 @@  discard block
 block discarded – undo
230 230
             self::keysName($action,$arguments);
231 231
             self::readyFile($action,$arguments);
232 232
             print_r($arguments);
233
-        }
234
-        else {
233
+        } else {
235 234
             logger::write("$name method is not supported",'error');
236 235
         }
237 236
     }
@@ -256,8 +255,7 @@  discard block
 block discarded – undo
256 255
                     $arguments['media'][$key]['media'] = new CURLFile($media['media']);
257 256
                 }
258 257
             }
259
-        }
260
-        elseif ($file_params = self::methodFile($name)) {
258
+        } elseif ($file_params = self::methodFile($name)) {
261 259
             foreach ($file_params as $param) {
262 260
                 if (isset($arguments[$param]) && file_exists($arguments[$param])) {
263 261
                     $arguments[$param] = new CURLFile($arguments[$param]);
Please login to merge, or discard this patch.
logger.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     private static $handler;
9 9
 
10 10
 
11
-    public static function init (int $log_size = 10) {
11
+    public static function init(int $log_size = 10) {
12 12
         self::$log_size = $log_size;
13 13
         if (file_exists('BPT.log') && !(filesize('BPT.log') > self::$log_size * 1024 * 1024)) {
14 14
             $mode = 'a';
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
         self::$handler = fopen('BPT.log', $mode);
23 23
 
24 24
         if ($write) {
25
-            fwrite(self::$handler,"♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library  ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nTnx for using our library\nSome information about us :\nAuthor : @Im_Miaad\nHelper : @A_LiReza_ME\nChannel : @BPT_CH\nOur Website : https://bptlib.ir\n\nIf you have any problem with our library\nContact to our supports\n♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library  ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nINFO : BPT Library LOG STARTED ...\nwarning : this file automatically deleted when its size reached log_size setting, do not delete it manually\n\n");
25
+            fwrite(self::$handler, "♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library  ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nTnx for using our library\nSome information about us :\nAuthor : @Im_Miaad\nHelper : @A_LiReza_ME\nChannel : @BPT_CH\nOur Website : https://bptlib.ir\n\nIf you have any problem with our library\nContact to our supports\n♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library  ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nINFO : BPT Library LOG STARTED ...\nwarning : this file automatically deleted when its size reached log_size setting, do not delete it manually\n\n");
26 26
         }
27 27
     }
28 28
 
29 29
     public static function write($data, $type = '') {
30 30
         if (!is_null(self::$handler)) {
31
-            $text = date('Y/m/d H:i:s') . ( $type === '' ? " : $data\n\n" : " : ⤵\n$type : $data\n\n" );
31
+            $text = date('Y/m/d H:i:s').($type === '' ? " : $data\n\n" : " : ⤵\n$type : $data\n\n");
32 32
             fwrite(self::$handler, $text);
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
         if (file_exists('BPT.log') && !(filesize('BPT.log') > self::$log_size * 1024 * 1024)) {
14 14
             $mode = 'a';
15 15
             $write = false;
16
-        }
17
-        else {
16
+        } else {
18 17
             $mode = 'w';
19 18
             $write = true;
20 19
         }
Please login to merge, or discard this patch.
BPT.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
     public function __call (string $name, array $arguments) {
18 18
         if (!isset($arguments[1]) && is_array($arguments[0])) {
19 19
             request::$name(...$arguments[0]);
20
-        }
21
-        else {
20
+        } else {
22 21
             request::$name($arguments);
23 22
         }
24 23
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -217,18 +217,18 @@  discard block
 block discarded – undo
217 217
  * @method getGameHighScores (int|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 $return_array = 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. On success, returns an Array of GameHighScore objects.
218 218
  * @method getGameHigh (int|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 $return_array = 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. On success, returns an Array of GameHighScore objects.
219 219
  */
220
-class BPT{
220
+class BPT {
221 221
     public static update $update;
222 222
 
223 223
     public static BPT $handler;
224 224
 
225 225
 
226
-    public function __construct (array|stdClass $settings) {
226
+    public function __construct(array | stdClass $settings) {
227 227
         settings::init($settings);
228 228
         static::$handler = &$this;
229 229
     }
230 230
 
231
-    public function __call (string $name, array $arguments) {
231
+    public function __call(string $name, array $arguments) {
232 232
         if (!isset($arguments[1]) && is_array($arguments[0])) {
233 233
             request::$name(...$arguments[0]);
234 234
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         }
238 238
     }
239 239
 
240
-    public static function close () {
240
+    public static function close() {
241 241
         die("<div style='width:98vw;height:98vh;display:flex;justify-content:center;align-items:center;font-size:25vw'>BPT</div>");
242 242
     }
243 243
 }
Please login to merge, or discard this patch.
types/callbackGame.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
  * A placeholder, currently holds no information. Use BotFather to set up your game.
9 9
  */
10 10
 class callbackGame extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [];
13 13
 
14
-	public function __construct(stdClass $update) {
15
-		parent::__construct($update, self::subs);
16
-	}
14
+    public function __construct(stdClass $update) {
15
+        parent::__construct($update, self::subs);
16
+    }
17 17
 }
Please login to merge, or discard this patch.
types/chatJoinRequest.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@
 block discarded – undo
8 8
  * Represents a join request sent to a chat.
9 9
  */
10 10
 class chatJoinRequest extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [
13
-		'chat' => 'BPT\types\chat',
14
-		'from' => 'BPT\types\user',
15
-		'invite_link' => 'BPT\types\chatInviteLink',
16
-	];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [
13
+        'chat' => 'BPT\types\chat',
14
+        'from' => 'BPT\types\user',
15
+        'invite_link' => 'BPT\types\chatInviteLink',
16
+    ];
17 17
 
18
-	/** Chat to which the request was sent */
19
-	public chat $chat;
18
+    /** Chat to which the request was sent */
19
+    public chat $chat;
20 20
 
21
-	/** User that sent the join request */
22
-	public user $from;
21
+    /** User that sent the join request */
22
+    public user $from;
23 23
 
24
-	/** Date the request was sent in Unix time */
25
-	public int $date;
24
+    /** Date the request was sent in Unix time */
25
+    public int $date;
26 26
 
27
-	/** Optional. Bio of the user. */
28
-	public string $bio;
27
+    /** Optional. Bio of the user. */
28
+    public string $bio;
29 29
 
30
-	/** Optional. Chat invite link that was used by the user to send the join request */
31
-	public chatInviteLink $invite_link;
30
+    /** Optional. Chat invite link that was used by the user to send the join request */
31
+    public chatInviteLink $invite_link;
32 32
 
33 33
 
34
-	public function __construct(stdClass $update) {
35
-		parent::__construct($update, self::subs);
36
-	}
34
+    public function __construct(stdClass $update) {
35
+        parent::__construct($update, self::subs);
36
+    }
37 37
 }
Please login to merge, or discard this patch.
types/inlineQueryResultVideo.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -10,62 +10,62 @@
 block discarded – undo
10 10
  * message with the specified content instead of the video.
11 11
  */
12 12
 class inlineQueryResultVideo extends types {
13
-	/** Keep all of properties which has sub properties */
14
-	private const subs = [
15
-		'reply_markup' => 'BPT\types\inlineKeyboardMarkup',
16
-		'input_message_content' => 'BPT\types\inputMessageContent',
17
-	];
13
+    /** Keep all of properties which has sub properties */
14
+    private const subs = [
15
+        'reply_markup' => 'BPT\types\inlineKeyboardMarkup',
16
+        'input_message_content' => 'BPT\types\inputMessageContent',
17
+    ];
18 18
 
19
-	/** Type of the result, must be video */
20
-	public string $type;
19
+    /** Type of the result, must be video */
20
+    public string $type;
21 21
 
22
-	/** Unique identifier for this result, 1-64 bytes */
23
-	public string $id;
22
+    /** Unique identifier for this result, 1-64 bytes */
23
+    public string $id;
24 24
 
25
-	/** A valid URL for the embedded video player or video file */
26
-	public string $video_url;
25
+    /** A valid URL for the embedded video player or video file */
26
+    public string $video_url;
27 27
 
28
-	/** Mime type of the content of video url, “text/html” or “video/mp4” */
29
-	public string $mime_type;
28
+    /** Mime type of the content of video url, “text/html” or “video/mp4” */
29
+    public string $mime_type;
30 30
 
31
-	/** URL of the thumbnail (JPEG only) for the video */
32
-	public string $thumb_url;
31
+    /** URL of the thumbnail (JPEG only) for the video */
32
+    public string $thumb_url;
33 33
 
34
-	/** Title for the result */
35
-	public string $title;
34
+    /** Title for the result */
35
+    public string $title;
36 36
 
37
-	/** Optional. Caption of the video to be sent, 0-1024 characters after entities parsing */
38
-	public string $caption;
37
+    /** Optional. Caption of the video to be sent, 0-1024 characters after entities parsing */
38
+    public string $caption;
39 39
 
40
-	/** Optional. Mode for parsing entities in the video caption. See formatting options for more details. */
41
-	public string $parse_mode;
40
+    /** Optional. Mode for parsing entities in the video caption. See formatting options for more details. */
41
+    public string $parse_mode;
42 42
 
43
-	/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
44
-	public array $caption_entities;
43
+    /** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
44
+    public array $caption_entities;
45 45
 
46
-	/** Optional. Video width */
47
-	public int $video_width;
46
+    /** Optional. Video width */
47
+    public int $video_width;
48 48
 
49
-	/** Optional. Video height */
50
-	public int $video_height;
49
+    /** Optional. Video height */
50
+    public int $video_height;
51 51
 
52
-	/** Optional. Video duration in seconds */
53
-	public int $video_duration;
52
+    /** Optional. Video duration in seconds */
53
+    public int $video_duration;
54 54
 
55
-	/** Optional. Short description of the result */
56
-	public string $description;
55
+    /** Optional. Short description of the result */
56
+    public string $description;
57 57
 
58
-	/** Optional. Inline keyboard attached to the message */
59
-	public inlineKeyboardMarkup $reply_markup;
58
+    /** Optional. Inline keyboard attached to the message */
59
+    public inlineKeyboardMarkup $reply_markup;
60 60
 
61
-	/**
62
-	 * Optional. Content of the message to be sent instead of the video. This field is required if
63
-	 * InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
64
-	 */
65
-	public inputMessageContent $input_message_content;
61
+    /**
62
+     * Optional. Content of the message to be sent instead of the video. This field is required if
63
+     * InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
64
+     */
65
+    public inputMessageContent $input_message_content;
66 66
 
67 67
 
68
-	public function __construct(stdClass $update) {
69
-		parent::__construct($update, self::subs);
70
-	}
68
+    public function __construct(stdClass $update) {
69
+        parent::__construct($update, self::subs);
70
+    }
71 71
 }
Please login to merge, or discard this patch.