Passed
Push — main ( e0778d...2e4cb3 )
by Miaad
10:42
created
src/types/sharedUser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,22 +22,22 @@
 block discarded – undo
22 22
     public int $user_id;
23 23
 
24 24
     /** Optional. First name of the user, if the name was requested by the bot */
25
-    public null|string $first_name = null;
25
+    public null | string $first_name = null;
26 26
 
27 27
     /** Optional. Last name of the user, if the name was requested by the bot */
28
-    public null|string $last_name = null;
28
+    public null | string $last_name = null;
29 29
 
30 30
     /** Optional. Username of the user, if the username was requested by the bot */
31
-    public null|string $username = null;
31
+    public null | string $username = null;
32 32
 
33 33
     /**
34 34
      * Optional. Available sizes of the chat photo, if the photo was requested by the bot
35 35
      * @var photoSize[]
36 36
      */
37
-    public null|array $photo = null;
37
+    public null | array $photo = 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
         }
Please login to merge, or discard this patch.
src/types/chatShared.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
     public int $chat_id;
27 27
 
28 28
     /** Optional. Title of the chat, if the title was requested by the bot. */
29
-    public null|string $title = null;
29
+    public null | string $title = null;
30 30
 
31 31
     /** Optional. Username of the chat, if the username was requested by the bot and available. */
32
-    public null|string $username = null;
32
+    public null | string $username = null;
33 33
 
34 34
     /**
35 35
      * Optional. Available sizes of the chat photo, if the photo was requested by the bot
36 36
      * @var photoSize[]
37 37
      */
38
-    public null|array $photo = null;
38
+    public null | array $photo = 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
         }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return responseError|chat
53 53
      */
54
-    public function getInfo (bool $answer = null): responseError|chat {
54
+    public function getInfo(bool $answer = null): responseError | chat {
55 55
         return telegram::getChat($this->chat_id, answer: $answer);
56 56
     }
57 57
 }
Please login to merge, or discard this patch.
src/types/inputSticker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on
27 27
      * Sending Files »
28 28
      */
29
-    public string|CURLFile $sticker;
29
+    public string | CURLFile $sticker;
30 30
 
31 31
     /**
32 32
      * Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public array $keywords;
52 52
 
53 53
 
54
-    public function __construct(stdClass|null $object = null) {
54
+    public function __construct(stdClass | null $object = null) {
55 55
         if ($object != null) {
56 56
             parent::__construct($object, self::subs);
57 57
         }
Please login to merge, or discard this patch.
src/types/voice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
     public int $duration;
27 27
 
28 28
     /** Optional. MIME type of the file as defined by sender */
29
-    public null|string $mime_type = null;
29
+    public null | string $mime_type = null;
30 30
 
31 31
     /**
32 32
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
33 33
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
34 34
      * integer or double-precision float type are safe for storing this value.
35 35
      */
36
-    public null|int $file_size = null;
36
+    public null | int $file_size = 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
         }
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return bool|string string will be returned when destination doesn't set
59 59
      */
60
-    public function download(string|null $destination = null): bool|string {
61
-        return telegram::downloadFile($destination ?? 'unknown.ogg',$this->file_id);
60
+    public function download(string | null $destination = null): bool | string {
61
+        return telegram::downloadFile($destination ?? 'unknown.ogg', $this->file_id);
62 62
     }
63 63
 
64 64
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         return telegram::fileLink($this->file_id);
73 73
     }
74 74
 
75
-    public function typedSize (int $precision = 2, bool $space_between = true): string {
75
+    public function typedSize(int $precision = 2, bool $space_between = true): string {
76 76
         return tools::byteFormat($this->file_id, $precision, $space_between);
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
src/types/user.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,43 +22,43 @@  discard block
 block discarded – undo
22 22
     public int $id;
23 23
 
24 24
     /** True, if this user is a bot */
25
-    public null|bool $is_bot = null;
25
+    public null | bool $is_bot = null;
26 26
 
27 27
     /** User's or bot's first name */
28
-    public null|string $first_name = null;
28
+    public null | string $first_name = null;
29 29
 
30 30
     /** Optional. User's or bot's last name */
31
-    public null|string $last_name = null;
31
+    public null | string $last_name = null;
32 32
 
33 33
     /** Optional. User's or bot's username */
34
-    public null|string $username = null;
34
+    public null | string $username = null;
35 35
 
36 36
     /** Optional. IETF language tag of the user's language */
37
-    public null|string $language_code = null;
37
+    public null | string $language_code = null;
38 38
 
39 39
     /** Optional. True, if this user is a Telegram Premium user */
40
-    public null|bool $is_premium = null;
40
+    public null | bool $is_premium = null;
41 41
 
42 42
     /** Optional. True, if this user added the bot to the attachment menu */
43
-    public null|bool $added_to_attachment_menu = null;
43
+    public null | bool $added_to_attachment_menu = null;
44 44
 
45 45
     /** Optional. True, if the bot can be invited to groups. Returned only in getMe. */
46
-    public null|bool $can_join_groups = null;
46
+    public null | bool $can_join_groups = null;
47 47
 
48 48
     /** Optional. True, if privacy mode is disabled for the bot. Returned only in getMe. */
49
-    public null|bool $can_read_all_group_messages = null;
49
+    public null | bool $can_read_all_group_messages = null;
50 50
 
51 51
     /** Optional. True, if the bot supports inline queries. Returned only in getMe. */
52
-    public null|bool $supports_inline_queries = null;
52
+    public null | bool $supports_inline_queries = null;
53 53
 
54 54
     /**
55 55
      * Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned
56 56
      * only in getMe.
57 57
      */
58
-    public null|bool $can_connect_to_business = null;
58
+    public null | bool $can_connect_to_business = null;
59 59
 
60 60
 
61
-    public function __construct(stdClass|null $object = null) {
61
+    public function __construct(stdClass | null $object = null) {
62 62
         if ($object != null) {
63 63
             parent::__construct($object, self::subs);
64 64
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @return string
90 90
      */
91 91
     public function fullName(bool $nameFirst = true): string {
92
-        return trim($nameFirst ? $this->first_name . ' ' . $this->last_name : $this->last_name . ' ' . $this->first_name);
92
+        return trim($nameFirst ? $this->first_name.' '.$this->last_name : $this->last_name.' '.$this->first_name);
93 93
     }
94 94
 
95 95
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      *
102 102
      * @return userProfilePhotos|responseError
103 103
      */
104
-    public function getProfiles(int|null $offset = null, int|null $limit = null, bool $answer = null): userProfilePhotos|responseError {
104
+    public function getProfiles(int | null $offset = null, int | null $limit = null, bool $answer = null): userProfilePhotos | responseError {
105 105
         return telegram::getUserProfilePhotos($this->id, $offset, $limit, answer: $answer);
106 106
     }
107 107
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @return string
117 117
      */
118
-    public function getMention (string $link_text = '', string $parse_mode = '') {
118
+    public function getMention(string $link_text = '', string $parse_mode = '') {
119 119
         if (empty($link_text)) {
120 120
             $link_text = $this->fullName();
121 121
         }
Please login to merge, or discard this patch.
src/types/userShared.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public int $user_id;
27 27
 
28
-    public function __construct (stdClass|null $object = null) {
28
+    public function __construct(stdClass | null $object = null) {
29 29
         if ($object != null) {
30 30
             parent::__construct($object, self::subs);
31 31
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return responseError|chat
40 40
      */
41
-    public function getInfo (bool $answer = null): responseError|chat {
41
+    public function getInfo(bool $answer = null): responseError | chat {
42 42
         return telegram::getChat($this->user_id, answer: $answer);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
src/types/contact.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,20 +20,20 @@  discard block
 block discarded – undo
20 20
     public string $first_name;
21 21
 
22 22
     /** Optional. Contact's last name */
23
-    public null|string $last_name = null;
23
+    public null | string $last_name = null;
24 24
 
25 25
     /**
26 26
      * Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some
27 27
      * programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant
28 28
      * bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
29 29
      */
30
-    public null|int $user_id = null;
30
+    public null | int $user_id = null;
31 31
 
32 32
     /** Optional. Additional data about the contact in the form of a vCard */
33
-    public null|string $vcard = null;
33
+    public null | string $vcard = null;
34 34
 
35 35
 
36
-    public function __construct(stdClass|null $object = null) {
36
+    public function __construct(stdClass | null $object = null) {
37 37
         if ($object != null) {
38 38
             parent::__construct($object, self::subs);
39 39
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return $this->user_id === request::catchFields(fields::USER_ID);
49 49
     }
50 50
 
51
-    public function fullName (): string {
52
-        return trim($this->first_name . ' ' . ($this->last_name ?? ''));
51
+    public function fullName(): string {
52
+        return trim($this->first_name.' '.($this->last_name ?? ''));
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
src/types/businessOpeningHours.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public array $opening_hours;
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
         }
Please login to merge, or discard this patch.
src/types/inputPollOption.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,23 +12,23 @@
 block discarded – undo
12 12
     private const subs = ['array' => ['text_entities' => 'BPT\types\messageEntity']];
13 13
 
14 14
     /** Option text, 1-100 characters */
15
-    public string|null $text = null;
15
+    public string | null $text = null;
16 16
 
17 17
     /**
18 18
      * Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only
19 19
      * custom emoji entities are allowed
20 20
      */
21
-    public string|null $text_parse_mode = null;
21
+    public string | null $text_parse_mode = null;
22 22
 
23 23
     /**
24 24
      * Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified
25 25
      * instead of text_parse_mode
26 26
      * @var messageEntity[]
27 27
      */
28
-    public array|null $text_entities = null;
28
+    public array | null $text_entities = null;
29 29
 
30 30
 
31
-    public function __construct(stdClass|null $object = null) {
31
+    public function __construct(stdClass | null $object = null) {
32 32
         if ($object != null) {
33 33
             parent::__construct($object, self::subs);
34 34
         }
Please login to merge, or discard this patch.