Passed
Push — main ( 23165f...4af278 )
by Miaad
01:25
created
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
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 use BPT\types\update;
7 7
 use stdClass;
8 8
 
9
-class BPT{
9
+class BPT {
10 10
     public update $update;
11 11
 
12 12
 
13
-    public function __construct (array|stdClass $settings) {
13
+    public function __construct(array | stdClass $settings) {
14 14
         settings::init($settings);
15 15
     }
16 16
 
17
-    public function __call (string $name, array $arguments) {
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 20
         }
Please login to merge, or discard this patch.
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.
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.
types/botCommand.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
  * This object represents a bot command.
9 9
  */
10 10
 class botCommand 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
-	/** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
15
-	public string $command;
14
+    /** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
15
+    public string $command;
16 16
 
17
-	/** Description of the command; 1-256 characters. */
18
-	public string $description;
17
+    /** Description of the command; 1-256 characters. */
18
+    public string $description;
19 19
 
20 20
 
21
-	public function __construct(stdClass $update) {
22
-		parent::__construct($update, self::subs);
23
-	}
21
+    public function __construct(stdClass $update) {
22
+        parent::__construct($update, self::subs);
23
+    }
24 24
 }
Please login to merge, or discard this patch.
types/keyboardButtonPollType.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
  * is pressed.
10 10
  */
11 11
 class keyboardButtonPollType extends types {
12
-	/** Keep all of properties which has sub properties */
13
-	private const subs = [];
12
+    /** Keep all of properties which has sub properties */
13
+    private const subs = [];
14 14
 
15
-	/**
16
-	 * Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is
17
-	 * passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
18
-	 */
19
-	public string $type;
15
+    /**
16
+     * Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is
17
+     * passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
18
+     */
19
+    public string $type;
20 20
 
21 21
 
22
-	public function __construct(stdClass $update) {
23
-		parent::__construct($update, self::subs);
24
-	}
22
+    public function __construct(stdClass $update) {
23
+        parent::__construct($update, self::subs);
24
+    }
25 25
 }
Please login to merge, or discard this patch.
types/chatMemberLeft.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
  * Represents a chat member that isn't currently a member of the chat, but may join it themselves.
9 9
  */
10 10
 class chatMemberLeft extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = ['user' => 'BPT\types\user'];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = ['user' => 'BPT\types\user'];
13 13
 
14
-	/** The member's status in the chat, always “left” */
15
-	public string $status;
14
+    /** The member's status in the chat, always “left” */
15
+    public string $status;
16 16
 
17
-	/** Information about the user */
18
-	public user $user;
17
+    /** Information about the user */
18
+    public user $user;
19 19
 
20 20
 
21
-	public function __construct(stdClass $update) {
22
-		parent::__construct($update, self::subs);
23
-	}
21
+    public function __construct(stdClass $update) {
22
+        parent::__construct($update, self::subs);
23
+    }
24 24
 }
Please login to merge, or discard this patch.
types/inlineQueryResultDocument.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -10,56 +10,56 @@
 block discarded – undo
10 10
  * file. Currently, only .PDF and .ZIP files can be sent using this method.
11 11
  */
12 12
 class inlineQueryResultDocument 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 document */
20
-	public string $type;
19
+    /** Type of the result, must be document */
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
-	/** Title for the result */
26
-	public string $title;
25
+    /** Title for the result */
26
+    public string $title;
27 27
 
28
-	/** Optional. Caption of the document to be sent, 0-1024 characters after entities parsing */
29
-	public string $caption;
28
+    /** Optional. Caption of the document to be sent, 0-1024 characters after entities parsing */
29
+    public string $caption;
30 30
 
31
-	/** Optional. Mode for parsing entities in the document caption. See formatting options for more details. */
32
-	public string $parse_mode;
31
+    /** Optional. Mode for parsing entities in the document caption. See formatting options for more details. */
32
+    public string $parse_mode;
33 33
 
34
-	/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
35
-	public array $caption_entities;
34
+    /** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
35
+    public array $caption_entities;
36 36
 
37
-	/** A valid URL for the file */
38
-	public string $document_url;
37
+    /** A valid URL for the file */
38
+    public string $document_url;
39 39
 
40
-	/** Mime type of the content of the file, either “application/pdf” or “application/zip” */
41
-	public string $mime_type;
40
+    /** Mime type of the content of the file, either “application/pdf” or “application/zip” */
41
+    public string $mime_type;
42 42
 
43
-	/** Optional. Short description of the result */
44
-	public string $description;
43
+    /** Optional. Short description of the result */
44
+    public string $description;
45 45
 
46
-	/** Optional. Inline keyboard attached to the message */
47
-	public inlineKeyboardMarkup $reply_markup;
46
+    /** Optional. Inline keyboard attached to the message */
47
+    public inlineKeyboardMarkup $reply_markup;
48 48
 
49
-	/** Optional. Content of the message to be sent instead of the file */
50
-	public inputMessageContent $input_message_content;
49
+    /** Optional. Content of the message to be sent instead of the file */
50
+    public inputMessageContent $input_message_content;
51 51
 
52
-	/** Optional. URL of the thumbnail (JPEG only) for the file */
53
-	public string $thumb_url;
52
+    /** Optional. URL of the thumbnail (JPEG only) for the file */
53
+    public string $thumb_url;
54 54
 
55
-	/** Optional. Thumbnail width */
56
-	public int $thumb_width;
55
+    /** Optional. Thumbnail width */
56
+    public int $thumb_width;
57 57
 
58
-	/** Optional. Thumbnail height */
59
-	public int $thumb_height;
58
+    /** Optional. Thumbnail height */
59
+    public int $thumb_height;
60 60
 
61 61
 
62
-	public function __construct(stdClass $update) {
63
-		parent::__construct($update, self::subs);
64
-	}
62
+    public function __construct(stdClass $update) {
63
+        parent::__construct($update, self::subs);
64
+    }
65 65
 }
Please login to merge, or discard this patch.