Passed
Push — main ( 6b17f2...1e3b41 )
by Miaad
11:18
created
src/types/user.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,37 +21,37 @@  discard block
 block discarded – undo
21 21
     public int $id;
22 22
 
23 23
     /** True, if this user is a bot */
24
-    public null|bool $is_bot = null;
24
+    public null | bool $is_bot = null;
25 25
 
26 26
     /** User's or bot's first name */
27
-    public null|string $first_name = null;
27
+    public null | string $first_name = null;
28 28
 
29 29
     /** Optional. User's or bot's last name */
30
-    public null|string $last_name = null;
30
+    public null | string $last_name = null;
31 31
 
32 32
     /** Optional. User's or bot's username */
33
-    public null|string $username = null;
33
+    public null | string $username = null;
34 34
 
35 35
     /** Optional. IETF language tag of the user's language */
36
-    public null|string $language_code = null;
36
+    public null | string $language_code = null;
37 37
 
38 38
     /** Optional. True, if this user is a Telegram Premium user */
39
-    public null|bool $is_premium = null;
39
+    public null | bool $is_premium = null;
40 40
 
41 41
     /** Optional. True, if this user added the bot to the attachment menu */
42
-    public null|bool $added_to_attachment_menu = null;
42
+    public null | bool $added_to_attachment_menu = null;
43 43
 
44 44
     /** Optional. True, if the bot can be invited to groups. Returned only in getMe. */
45
-    public null|bool $can_join_groups = null;
45
+    public null | bool $can_join_groups = null;
46 46
 
47 47
     /** Optional. True, if privacy mode is disabled for the bot. Returned only in getMe. */
48
-    public null|bool $can_read_all_group_messages = null;
48
+    public null | bool $can_read_all_group_messages = null;
49 49
 
50 50
     /** Optional. True, if the bot supports inline queries. Returned only in getMe. */
51
-    public null|bool $supports_inline_queries = null;
51
+    public null | bool $supports_inline_queries = null;
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
         }
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
     }
63 63
 
64 64
     public function fullName(bool $nameFirst = true): string {
65
-        return trim($nameFirst ? $this->first_name . ' ' . $this->last_name : $this->last_name . ' ' . $this->first_name);
65
+        return trim($nameFirst ? $this->first_name.' '.$this->last_name : $this->last_name.' '.$this->first_name);
66 66
     }
67 67
 
68
-    public function getProfiles(int|null $offset = null, int|null $limit = null): userProfilePhotos|responseError {
69
-        return telegram::getUserProfilePhotos($this->id,$offset,$limit);
68
+    public function getProfiles(int | null $offset = null, int | null $limit = null): userProfilePhotos | responseError {
69
+        return telegram::getUserProfilePhotos($this->id, $offset, $limit);
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
src/types/photoSize.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
     public int $height;
29 29
 
30 30
     /** Optional. File size in bytes */
31
-    public null|int $file_size = null;
31
+    public null | int $file_size = null;
32 32
 
33 33
 
34
-    public function __construct(stdClass|null $object = null) {
34
+    public function __construct(stdClass | null $object = null) {
35 35
         if ($object != null) {
36 36
             parent::__construct($object, self::subs);
37 37
         }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return bool|string string will be returned when destination doesn't set
54 54
      */
55
-    public function download(string|null $destination = null): bool|string {
56
-        return telegram::downloadFile($destination ?? 'unknown.jpg',$this->file_id);
55
+    public function download(string | null $destination = null): bool | string {
56
+        return telegram::downloadFile($destination ?? 'unknown.jpg', $this->file_id);
57 57
     }
58 58
 
59 59
     public function link(): string {
Please login to merge, or discard this patch.
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/audio.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,29 +25,29 @@  discard block
 block discarded – undo
25 25
     public int $duration;
26 26
 
27 27
     /** Optional. Performer of the audio as defined by sender or by audio tags */
28
-    public null|string $performer = null;
28
+    public null | string $performer = null;
29 29
 
30 30
     /** Optional. Title of the audio as defined by sender or by audio tags */
31
-    public null|string $title = null;
31
+    public null | string $title = null;
32 32
 
33 33
     /** Optional. Original filename as defined by sender */
34
-    public null|string $file_name = null;
34
+    public null | string $file_name = null;
35 35
 
36 36
     /** Optional. MIME type of the file as defined by sender */
37
-    public null|string $mime_type = null;
37
+    public null | string $mime_type = null;
38 38
 
39 39
     /**
40 40
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
41 41
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
42 42
      * integer or double-precision float type are safe for storing this value.
43 43
      */
44
-    public null|int $file_size = null;
44
+    public null | int $file_size = null;
45 45
 
46 46
     /** Optional. Thumbnail of the album cover to which the music file belongs */
47
-    public null|photoSize $thumb = null;
47
+    public null | photoSize $thumb = null;
48 48
 
49 49
 
50
-    public function __construct(stdClass|null $object = null) {
50
+    public function __construct(stdClass | null $object = null) {
51 51
         if ($object != null) {
52 52
             parent::__construct($object, self::subs);
53 53
         }
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @return bool|string string will be returned when destination doesn't set
70 70
      */
71
-    public function download(string|null $destination = null): bool|string {
72
-        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3',$this->file_id);
71
+    public function download(string | null $destination = null): bool | string {
72
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3', $this->file_id);
73 73
     }
74 74
 
75 75
     public function link(): 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/video.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@  discard block
 block discarded – undo
31 31
     public int $duration;
32 32
 
33 33
     /** Optional. Video thumbnail */
34
-    public null|photoSize $thumb = null;
34
+    public null | photoSize $thumb = null;
35 35
 
36 36
     /** Optional. Original filename as defined by sender */
37
-    public null|string $file_name = null;
37
+    public null | string $file_name = null;
38 38
 
39 39
     /** Optional. MIME type of the file as defined by sender */
40
-    public null|string $mime_type = null;
40
+    public null | string $mime_type = null;
41 41
 
42 42
     /**
43 43
      * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
44 44
      * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
45 45
      * integer or double-precision float type are safe for storing this value.
46 46
      */
47
-    public null|int $file_size = null;
47
+    public null | int $file_size = null;
48 48
 
49 49
 
50
-    public function __construct(stdClass|null $object = null) {
50
+    public function __construct(stdClass | null $object = null) {
51 51
         if ($object != null) {
52 52
             parent::__construct($object, self::subs);
53 53
         }
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @return bool|string string will be returned when destination doesn't set
70 70
      */
71
-    public function download(string|null $destination = null): bool|string {
72
-        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4',$this->file_id);
71
+    public function download(string | null $destination = null): bool | string {
72
+        return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $this->file_id);
73 73
     }
74 74
 
75 75
     public function link(): string {
Please login to merge, or discard this patch.
src/types/sticker.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,34 +38,34 @@  discard block
 block discarded – undo
38 38
     public int $height;
39 39
 
40 40
     /** True, if the sticker is animated */
41
-    public null|bool $is_animated = null;
41
+    public null | bool $is_animated = null;
42 42
 
43 43
     /** True, if the sticker is a video sticker */
44
-    public null|bool $is_video = null;
44
+    public null | bool $is_video = null;
45 45
 
46 46
     /** Optional. Sticker thumbnail in the .WEBP or .JPG format */
47
-    public null|photoSize $thumb = null;
47
+    public null | photoSize $thumb = null;
48 48
 
49 49
     /** Optional. Emoji associated with the sticker */
50
-    public null|string $emoji = null;
50
+    public null | string $emoji = null;
51 51
 
52 52
     /** Optional. Name of the sticker set to which the sticker belongs */
53
-    public null|string $set_name = null;
53
+    public null | string $set_name = null;
54 54
 
55 55
     /** Optional. Premium animation for the sticker, if the sticker is premium */
56
-    public null|file $premium_animation = null;
56
+    public null | file $premium_animation = null;
57 57
 
58 58
     /** Optional. For mask stickers, the position where the mask should be placed */
59
-    public null|maskPosition $mask_position = null;
59
+    public null | maskPosition $mask_position = null;
60 60
 
61 61
     /** Optional. For custom emoji stickers, unique identifier of the custom emoji */
62
-    public null|string $custom_emoji_id = null;
62
+    public null | string $custom_emoji_id = null;
63 63
 
64 64
     /** Optional. File size in bytes */
65
-    public null|int $file_size = null;
65
+    public null | int $file_size = null;
66 66
 
67 67
 
68
-    public function __construct(stdClass|null $object = null) {
68
+    public function __construct(stdClass | null $object = null) {
69 69
         if ($object != null) {
70 70
             parent::__construct($object, self::subs);
71 71
         }
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return bool|string string will be returned when destination doesn't set
88 88
      */
89
-    public function download(string|null $destination = null): bool|string {
90
-        return telegram::downloadFile($destination ?? 'unknown.png',$this->file_id);
89
+    public function download(string | null $destination = null): bool | string {
90
+        return telegram::downloadFile($destination ?? 'unknown.png', $this->file_id);
91 91
     }
92 92
 
93 93
     public function link(): string {
Please login to merge, or discard this patch.