Passed
Push — main ( 36dc31...e0778d )
by Miaad
10:46
created
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.
src/types/backgroundType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public string $theme_name;
54 54
 
55 55
 
56
-    public function __construct(stdClass|null $object = null) {
56
+    public function __construct(stdClass | null $object = null) {
57 57
         if ($object != null) {
58 58
             parent::__construct($object, self::subs);
59 59
         }
Please login to merge, or discard this patch.
src/types/update.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -54,114 +54,114 @@
 block discarded – undo
54 54
     public int $update_id;
55 55
 
56 56
     /** Optional. New incoming message of any kind - text, photo, sticker, etc. */
57
-    public null|message $message = null;
57
+    public null | message $message = null;
58 58
 
59 59
     /**
60 60
      * Optional. New version of a message that is known to the bot and was edited. This update may at times be
61 61
      * triggered by changes to message fields that are either unavailable or not actively used by your bot.
62 62
      */
63
-    public null|message $edited_message = null;
63
+    public null | message $edited_message = null;
64 64
 
65 65
     /** Optional. New incoming channel post of any kind - text, photo, sticker, etc. */
66
-    public null|message $channel_post = null;
66
+    public null | message $channel_post = null;
67 67
 
68 68
     /**
69 69
      * Optional. New version of a channel post that is known to the bot and was edited. This update may at times be
70 70
      * triggered by changes to message fields that are either unavailable or not actively used by your bot.
71 71
      */
72
-    public null|message $edited_channel_post = null;
72
+    public null | message $edited_channel_post = null;
73 73
 
74 74
     /**
75 75
      * Optional. The bot was connected to or disconnected from a business account, or a user edited an existing
76 76
      * connection with the bot
77 77
      */
78
-    public null|businessConnection $business_connection = null;
78
+    public null | businessConnection $business_connection = null;
79 79
 
80 80
     /** Optional. New non-service message from a connected business account */
81
-    public null|message $business_message = null;
81
+    public null | message $business_message = null;
82 82
 
83 83
     /** Optional. New version of a message from a connected business account */
84
-    public null|message $edited_business_message = null;
84
+    public null | message $edited_business_message = null;
85 85
 
86 86
     /** Optional. Messages were deleted from a connected business account */
87
-    public null|businessMessagesDeleted $deleted_business_messages = null;
87
+    public null | businessMessagesDeleted $deleted_business_messages = null;
88 88
 
89 89
     /**
90 90
      * Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must
91 91
      * explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update
92 92
      * isn't received for reactions set by bots.
93 93
      */
94
-    public null|messageReactionUpdated $message_reaction = null;
94
+    public null | messageReactionUpdated $message_reaction = null;
95 95
 
96 96
     /**
97 97
      * Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in
98 98
      * the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these
99 99
      * updates. The updates are grouped and can be sent with delay up to a few minutes.
100 100
      */
101
-    public null|messageReactionCountUpdated $message_reaction_count = null;
101
+    public null | messageReactionCountUpdated $message_reaction_count = null;
102 102
 
103 103
     /** Optional. New incoming inline query */
104
-    public null|inlineQuery $inline_query = null;
104
+    public null | inlineQuery $inline_query = null;
105 105
 
106 106
     /**
107 107
      * Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see
108 108
      * our documentation on the feedback collecting for details on how to enable these updates for your bot.
109 109
      */
110
-    public null|chosenInlineResult $chosen_inline_result = null;
110
+    public null | chosenInlineResult $chosen_inline_result = null;
111 111
 
112 112
     /** Optional. New incoming callback query */
113
-    public null|callbackQuery $callback_query = null;
113
+    public null | callbackQuery $callback_query = null;
114 114
 
115 115
     /** Optional. New incoming shipping query. Only for invoices with flexible price */
116
-    public null|shippingQuery $shipping_query = null;
116
+    public null | shippingQuery $shipping_query = null;
117 117
 
118 118
     /** Optional. New incoming pre-checkout query. Contains full information about checkout */
119
-    public null|preCheckoutQuery $pre_checkout_query = null;
119
+    public null | preCheckoutQuery $pre_checkout_query = null;
120 120
 
121 121
     /**
122 122
      * Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by
123 123
      * the bot
124 124
      */
125
-    public null|poll $poll = null;
125
+    public null | poll $poll = null;
126 126
 
127 127
     /**
128 128
      * Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were
129 129
      * sent by the bot itself.
130 130
      */
131
-    public null|pollAnswer $poll_answer = null;
131
+    public null | pollAnswer $poll_answer = null;
132 132
 
133 133
     /**
134 134
      * Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only
135 135
      * when the bot is blocked or unblocked by the user.
136 136
      */
137
-    public null|chatMemberUpdated $my_chat_member = null;
137
+    public null | chatMemberUpdated $my_chat_member = null;
138 138
 
139 139
     /**
140 140
      * Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must
141 141
      * explicitly specify “chat_member” in the list of allowed_updates to receive these updates.
142 142
      */
143
-    public null|chatMemberUpdated $chat_member = null;
143
+    public null | chatMemberUpdated $chat_member = null;
144 144
 
145 145
     /**
146 146
      * Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right
147 147
      * in the chat to receive these updates.
148 148
      */
149
-    public null|chatJoinRequest $chat_join_request = null;
149
+    public null | chatJoinRequest $chat_join_request = null;
150 150
 
151 151
     /**
152 152
      * Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these
153 153
      * updates.
154 154
      */
155
-    public null|chatBoostUpdated $chat_boost = null;
155
+    public null | chatBoostUpdated $chat_boost = null;
156 156
 
157 157
     /**
158 158
      * Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these
159 159
      * updates.
160 160
      */
161
-    public null|chatBoostRemoved $removed_chat_boost = null;
161
+    public null | chatBoostRemoved $removed_chat_boost = null;
162 162
 
163 163
 
164
-    public function __construct(stdClass|null $object = null) {
164
+    public function __construct(stdClass | null $object = null) {
165 165
         if ($object != null) {
166 166
             parent::__construct($object, self::subs);
167 167
         }
Please login to merge, or discard this patch.
src/types/keyboardButtonRequestUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public int $max_quantity;
42 42
 
43 43
 
44
-    public function __construct(stdClass|null $object = null) {
44
+    public function __construct(stdClass | null $object = null) {
45 45
         if ($object != null) {
46 46
             parent::__construct($object, self::subs);
47 47
         }
Please login to merge, or discard this patch.
src/types/keyboardButtonRequestChat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     public bool $request_photo;
83 83
 
84 84
 
85
-    public function __construct(stdClass|null $object = null) {
85
+    public function __construct(stdClass | null $object = null) {
86 86
         if ($object != null) {
87 87
             parent::__construct($object, self::subs);
88 88
         }
Please login to merge, or discard this patch.
src/types/audio.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,29 +26,29 @@  discard block
 block discarded – undo
26 26
     public int $duration;
27 27
 
28 28
     /** Optional. Performer of the audio as defined by sender or by audio tags */
29
-    public null|string $performer = null;
29
+    public null | string $performer = null;
30 30
 
31 31
     /** Optional. Title of the audio as defined by sender or by audio tags */
32
-    public null|string $title = null;
32
+    public null | string $title = null;
33 33
 
34 34
     /** Optional. Original filename as defined by sender */
35
-    public null|string $file_name = null;
35
+    public null | string $file_name = null;
36 36
 
37 37
     /** Optional. MIME type of the file as defined by sender */
38
-    public null|string $mime_type = null;
38
+    public null | string $mime_type = null;
39 39
 
40 40
     /**
41 41
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
42 42
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
43 43
      * integer or double-precision float type are safe for storing this value.
44 44
      */
45
-    public null|int $file_size = null;
45
+    public null | int $file_size = null;
46 46
 
47 47
     /** Optional. Thumbnail of the album cover to which the music file belongs */
48
-    public null|photoSize $thumbnail = null;
48
+    public null | photoSize $thumbnail = 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.mp3',$this->file_id);
72
+    public function download(string | null $destination = null): bool | string {
73
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3', $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/location.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
     public float $longitude;
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
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return string
49 49
      */
50
-    public function mapLink (): string {
50
+    public function mapLink(): string {
51 51
         return "https://www.google.com/maps/search/$this->latitude,$this->longitude";
52 52
     }
53 53
 }
Please login to merge, or discard this patch.