Passed
Push — main ( 0db665...9c8a7b )
by Miaad
01:57
created
src/types/chatPhoto.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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,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 $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
 
66 66
     public function link(bool $big = true): string {
Please login to merge, or discard this patch.
src/types/chatInviteLink.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,28 +31,28 @@
 block discarded – undo
31 31
     public bool $is_revoked;
32 32
 
33 33
     /** Optional. Invite link name */
34
-    public null|string $name = null;
34
+    public null | string $name = null;
35 35
 
36 36
     /** Optional. Point in time (Unix timestamp) when the link will expire or has been expired */
37
-    public null|int $expire_date = null;
37
+    public null | int $expire_date = null;
38 38
 
39 39
     /**
40 40
      * Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat
41 41
      * via this invite link; 1-99999
42 42
      */
43
-    public null|int $member_limit = null;
43
+    public null | int $member_limit = null;
44 44
 
45 45
     /** Optional. Number of pending join requests created using this link */
46
-    public null|int $pending_join_request_count = null;
46
+    public null | int $pending_join_request_count = null;
47 47
 
48 48
 
49
-    public function __construct(stdClass|null $object = null) {
49
+    public function __construct(stdClass | null $object = null) {
50 50
         if ($object != null) {
51 51
             parent::__construct($object, self::subs);
52 52
         }
53 53
     }
54 54
 
55
-    public function revoke(): self|responseError|bool {
55
+    public function revoke(): self | responseError | bool {
56 56
         return $this->is_revoked ?? telegram::revokeChatInviteLink($this->invite_link);
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
src/types/chatJoinRequest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@
 block discarded – undo
26 26
     public int $date;
27 27
 
28 28
     /** Optional. Bio of the user. */
29
-    public null|string $bio = null;
29
+    public null | string $bio = null;
30 30
 
31 31
     /** Optional. Chat invite link that was used by the user to send the join request */
32
-    public null|chatInviteLink $invite_link = null;
32
+    public null | chatInviteLink $invite_link = null;
33 33
 
34 34
 
35
-    public function __construct(stdClass|null $object = null) {
35
+    public function __construct(stdClass | null $object = null) {
36 36
         if ($object != null) {
37 37
             parent::__construct($object, self::subs);
38 38
         }
39 39
     }
40 40
 
41
-    public function accept(): responseError|bool {
42
-        return telegram::approveChatJoinRequest($this->chat->id,$this->from->id);
41
+    public function accept(): responseError | bool {
42
+        return telegram::approveChatJoinRequest($this->chat->id, $this->from->id);
43 43
     }
44 44
 
45
-    public function deny(): responseError|bool {
46
-        return telegram::declineChatJoinRequest($this->chat->id,$this->from->id);
45
+    public function deny(): responseError | bool {
46
+        return telegram::declineChatJoinRequest($this->chat->id, $this->from->id);
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
src/types/location.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,31 +18,31 @@
 block discarded – undo
18 18
     public float $latitude;
19 19
 
20 20
     /** Optional. The radius of uncertainty for the location, measured in meters; 0-1500 */
21
-    public null|float $horizontal_accuracy = null;
21
+    public null | float $horizontal_accuracy = null;
22 22
 
23 23
     /**
24 24
      * Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For
25 25
      * active live locations only.
26 26
      */
27
-    public null|int $live_period = null;
27
+    public null | int $live_period = null;
28 28
 
29 29
     /** Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. */
30
-    public null|int $heading = null;
30
+    public null | int $heading = null;
31 31
 
32 32
     /**
33 33
      * Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent
34 34
      * live locations only.
35 35
      */
36
-    public null|int $proximity_alert_radius = null;
36
+    public null | int $proximity_alert_radius = null;
37 37
 
38 38
 
39
-    public function __construct(stdClass|null $object = null) {
39
+    public function __construct(stdClass | null $object = null) {
40 40
         if ($object != null) {
41 41
             parent::__construct($object, self::subs);
42 42
         }
43 43
     }
44 44
 
45
-    public function mapLink (): string {
45
+    public function mapLink(): string {
46 46
         return "https://www.google.com/maps/search/$this->latitude,$this->longitude";
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
src/types/file.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
32 32
      * integer or double-precision float type are safe for storing this value.
33 33
      */
34
-    public null|int $file_size = null;
34
+    public null | int $file_size = null;
35 35
 
36 36
     /** Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */
37
-    public null|string $file_path = null;
37
+    public null | string $file_path = 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
         }
44 44
     }
45 45
 
46 46
     public function link(): string {
47
-        return settings::$down_url . 'bot' . settings::$token . '/' . $this->file_path;
47
+        return settings::$down_url.'bot'.settings::$token.'/'.$this->file_path;
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/types/voice.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
     public int $duration;
26 26
 
27 27
     /** Optional. MIME type of the file as defined by sender */
28
-    public null|string $mime_type = null;
28
+    public null | string $mime_type = null;
29 29
 
30 30
     /**
31 31
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
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
 
38
-    public function __construct(stdClass|null $object = null) {
38
+    public function __construct(stdClass | null $object = null) {
39 39
         if ($object != null) {
40 40
             parent::__construct($object, self::subs);
41 41
         }
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @return bool|string string will be returned when destination doesn't set
58 58
      */
59
-    public function download(string|null $destination = null): bool|string {
60
-        return telegram::downloadFile($destination ?? 'unknown.ogg',$this->file_id);
59
+    public function download(string | null $destination = null): bool | string {
60
+        return telegram::downloadFile($destination ?? 'unknown.ogg', $this->file_id);
61 61
     }
62 62
 
63 63
     public function link(): string {
Please login to merge, or discard this patch.
src/database/db.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 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 (): void {
20
+    public static function init(): void {
21 21
         if (!isset(settings::$db['type'])) {
22 22
             settings::$db['type'] = dbTypes::JSON;
23 23
         }
Please login to merge, or discard this patch.
src/types/forumTopicEdited.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
     public string $name;
16 16
 
17 17
     /** Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed */
18
-    public null|string $icon_custom_emoji_id = null;
18
+    public null | string $icon_custom_emoji_id = null;
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/writeAccessAllowed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.