Passed
Push — main ( 36dc31...e0778d )
by Miaad
10:46
created
src/types/videoNote.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
     public int $duration;
30 30
 
31 31
     /** Optional. Video thumbnail */
32
-    public null|photoSize $thumbnail = null;
32
+    public null | photoSize $thumbnail = null;
33 33
 
34 34
     /** Optional. File size in bytes */
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.mp4',$this->file_id);
59
+    public function download(string | null $destination = null): bool | string {
60
+        return telegram::downloadFile($destination ?? 'unknown.mp4', $this->file_id);
61 61
     }
62 62
 
63 63
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         return telegram::fileLink($this->file_id);
72 72
     }
73 73
 
74
-    public function typedSize (int $precision = 2, bool $space_between = true): string {
74
+    public function typedSize(int $precision = 2, bool $space_between = true): string {
75 75
         return tools::byteFormat($this->file_id, $precision, $space_between);
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/types/animation.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,23 +32,23 @@  discard block
 block discarded – undo
32 32
     public int $duration;
33 33
 
34 34
     /** Optional. Animation thumbnail as defined by sender */
35
-    public null|photoSize $thumbnail = null;
35
+    public null | photoSize $thumbnail = null;
36 36
 
37 37
     /** Optional. Original animation filename as defined by sender */
38
-    public null|string $file_name = null;
38
+    public null | string $file_name = null;
39 39
 
40 40
     /** Optional. MIME type of the file as defined by sender */
41
-    public null|string $mime_type = null;
41
+    public null | string $mime_type = null;
42 42
 
43 43
     /**
44 44
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
45 45
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
46 46
      * integer or double-precision float type are safe for storing this value.
47 47
      */
48
-    public null|int $file_size = null;
48
+    public null | int $file_size = null;
49 49
 
50 50
 
51
-    public function __construct(stdClass|null $object = null) {
51
+    public function __construct(stdClass | null $object = null) {
52 52
         if ($object != null) {
53 53
             parent::__construct($object, self::subs);
54 54
         }
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return bool|string string will be returned when destination doesn't set
71 71
      */
72
-    public function download(string|null $destination = null): bool|string {
73
-        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif',$this->file_id);
72
+    public function download(string | null $destination = null): bool | string {
73
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif', $this->file_id);
74 74
     }
75 75
 
76 76
     /**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         return telegram::fileLink($this->file_id);
85 85
     }
86 86
 
87
-    public function typedSize (int $precision = 2, bool $space_between = true): string {
87
+    public function typedSize(int $precision = 2, bool $space_between = true): string {
88 88
         return tools::byteFormat($this->file_id, $precision, $space_between);
89 89
     }
90 90
 }
Please login to merge, or discard this patch.
src/types/businessLocation.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 $address;
16 16
 
17 17
     /** Optional. Location of the business */
18
-    public null|location $location = null;
18
+    public null | location $location = 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/chatMember.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -18,103 +18,103 @@
 block discarded – undo
18 18
     public user $user;
19 19
 
20 20
     /** `creator` and `administrator` only. True, if the user's presence in the chat is hidden */
21
-    public null|bool $is_anonymous = null;
21
+    public null | bool $is_anonymous = null;
22 22
 
23 23
     /** `creator` and `administrator` only. Custom title for this user */
24
-    public null|string $custom_title = null;
24
+    public null | string $custom_title = null;
25 25
 
26 26
     /** `administrator` only. True, if the bot is allowed to edit administrator privileges of that user */
27
-    public null|bool $can_be_edited = null;
27
+    public null | bool $can_be_edited = null;
28 28
 
29 29
     /**
30 30
      * `administrator` only. True, if the administrator can access the chat event log, chat statistics, message statistics in
31 31
      * channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other
32 32
      * administrator privilege
33 33
      */
34
-    public null|bool $can_manage_chat = null;
34
+    public null | bool $can_manage_chat = null;
35 35
 
36 36
     /** `administrator` only. True, if the administrator can delete messages of other users */
37
-    public null|bool $can_delete_messages = null;
37
+    public null | bool $can_delete_messages = null;
38 38
 
39 39
     /** `administrator` only. True, if the administrator can manage video chats */
40
-    public null|bool $can_manage_video_chats = null;
40
+    public null | bool $can_manage_video_chats = null;
41 41
 
42 42
     /** `administrator` only. True, if the administrator can restrict, ban or unban chat members */
43
-    public null|bool $can_restrict_members = null;
43
+    public null | bool $can_restrict_members = null;
44 44
 
45 45
     /**
46 46
      * `administrator` only. if the administrator can add new administrators with a subset of their own privileges or demote
47 47
      * administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by
48 48
      * the user)
49 49
      */
50
-    public null|bool $can_promote_members = null;
50
+    public null | bool $can_promote_members = null;
51 51
 
52 52
     /** `administrator` and `restricted` only. True, if the user is allowed to change the chat title, photo and other settings */
53
-    public null|bool $can_change_info = null;
53
+    public null | bool $can_change_info = null;
54 54
 
55 55
     /** `administrator` and `restricted` only. True, if the user is allowed to invite new users to the chat */
56
-    public null|bool $can_invite_users = null;
56
+    public null | bool $can_invite_users = null;
57 57
 
58 58
     /** `administrator` only. Optional. True, if the administrator can post in the channel; channels only */
59
-    public null|bool $can_post_messages = null;
59
+    public null | bool $can_post_messages = null;
60 60
 
61 61
     /** `administrator` only. Optional. True, if the administrator can edit messages of other users and can pin messages; channels only */
62
-    public null|bool $can_edit_messages = null;
62
+    public null | bool $can_edit_messages = null;
63 63
 
64 64
     /** `administrator` and `restricted` only. Optional. True, if the user is allowed to pin messages; groups and supergroups only */
65
-    public null|bool $can_pin_messages = null;
65
+    public null | bool $can_pin_messages = null;
66 66
 
67 67
     /** administrator` only. Optional. True, if the administrator can post stories to the chat */
68
-    public null|bool $can_post_stories = null;
68
+    public null | bool $can_post_stories = null;
69 69
 
70 70
     /** administrator` only. Optional. True, if the administrator can edit stories posted by other users */
71
-    public null|bool $can_edit_stories = null;
71
+    public null | bool $can_edit_stories = null;
72 72
 
73 73
     /** administrator` only. Optional. True, if the administrator can delete stories posted by other users */
74
-    public null|bool $can_delete_stories = null;
74
+    public null | bool $can_delete_stories = null;
75 75
 
76 76
     /**
77 77
      * `administrator` : Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
78 78
      *
79 79
      * `restricted` : True, if the user is allowed to create forum topics
80 80
      */
81
-    public null|bool $can_manage_topics = null;
81
+    public null | bool $can_manage_topics = null;
82 82
 
83 83
     /** `restricted` only. True, if the user is a member of the chat at the moment of the request */
84
-    public null|bool $is_member = null;
84
+    public null | bool $is_member = null;
85 85
 
86 86
     /** `restricted` only. True, if the user is allowed to send text messages, contacts, locations and venues */
87
-    public null|bool $can_send_messages = null;
87
+    public null | bool $can_send_messages = null;
88 88
 
89 89
     /** `restricted` only. Optional. True, if the user is allowed to send audios */
90
-    public null|bool $can_send_audios = null;
90
+    public null | bool $can_send_audios = null;
91 91
 
92 92
     /** `restricted` only. Optional. True, if the user is allowed to send documents */
93
-    public null|bool $can_send_documents = null;
93
+    public null | bool $can_send_documents = null;
94 94
 
95 95
     /** `restricted` only. Optional. True, if the user is allowed to send photos */
96
-    public null|bool $can_send_photos = null;
96
+    public null | bool $can_send_photos = null;
97 97
 
98 98
     /** `restricted` only. Optional. True, if the user is allowed to send videos */
99
-    public null|bool $can_send_videos = null;
99
+    public null | bool $can_send_videos = null;
100 100
 
101 101
     /** `restricted` only. Optional. True, if the user is allowed to send video notes */
102
-    public null|bool $can_send_video_notes = null;
102
+    public null | bool $can_send_video_notes = null;
103 103
 
104 104
     /** `restricted` only. Optional. True, if the user is allowed to send voice notes */
105
-    public null|bool $can_send_voice_notes = null;
105
+    public null | bool $can_send_voice_notes = null;
106 106
 
107 107
     /** `restricted` only. True, if the user is allowed to send polls */
108
-    public null|bool $can_send_polls = null;
108
+    public null | bool $can_send_polls = null;
109 109
 
110 110
     /** `restricted` only. True, if the user is allowed to send animations, games, stickers and use inline bots */
111
-    public null|bool $can_send_other_messages = null;
111
+    public null | bool $can_send_other_messages = null;
112 112
 
113 113
     /** `restricted` only. True, if the user is allowed to add web page previews to their messages */
114
-    public null|bool $can_add_web_page_previews = null;
114
+    public null | bool $can_add_web_page_previews = null;
115 115
 
116 116
     /** `kicked` and `restricted` only. Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever */
117
-    public null|int $until_date = null;
117
+    public null | int $until_date = null;
118 118
 
119 119
 
120 120
     public function __construct(stdClass $object) {
Please login to merge, or discard this patch.
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.