Passed
Push — main ( 104144...d23e8a )
by Miaad
10:23
created
src/types/inputMedia.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the
53 53
      * thumbnail was uploaded using multipart/form-data under <file_attach_name>.
54 54
      */
55
-    public CURLFile|string $thumb;
55
+    public CURLFile | string $thumb;
56 56
 
57 57
     /** `video` and `animation` only. width */
58 58
     public int $width;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public bool $disable_content_type_detection;
80 80
 
81 81
 
82
-    public function __construct(stdClass|null $object = null) {
82
+    public function __construct(stdClass | null $object = null) {
83 83
         if ($object != null) {
84 84
             parent::__construct($object, self::subs);
85 85
         }
Please login to merge, or discard this patch.
src/types/messageEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public string $custom_emoji_id;
50 50
 
51 51
 
52
-    public function __construct(stdClass|null $object = null) {
52
+    public function __construct(stdClass | null $object = null) {
53 53
         if ($object != null) {
54 54
             parent::__construct($object, self::subs);
55 55
         }
Please login to merge, or discard this patch.
src/exception/telegramException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
  *
10 10
  * @todo make it usefully (it's not called at all)
11 11
  */
12
-class telegramException extends Exception{}
13 12
\ No newline at end of file
13
+class telegramException extends Exception {}
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
src/types/forumTopicClosed.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.
src/types/chatAdministratorRights.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public bool $can_manage_topics;
68 68
 
69 69
 
70
-    public function __construct(stdClass|null $object = null) {
70
+    public function __construct(stdClass | null $object = null) {
71 71
         if ($object != null) {
72 72
             parent::__construct($object, self::subs);
73 73
         }
Please login to merge, or discard this patch.
src/types/forumTopicReopened.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.
src/types/types.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                                 $this->$key[$sub_key][] = new ($subs['array']['array'][$key]) ($sub2_value);
27 27
                             }
28 28
                         }
29
-                        elseif(isset($subs['array'][$key])){
29
+                        elseif (isset($subs['array'][$key])) {
30 30
                             $this->$key[] = new ($subs['array'][$key]) ($sub_value);
31 31
                         }
32 32
                         else {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                         }
35 35
                     }
36 36
                 }
37
-                else{
37
+                else {
38 38
                     $this->$key = $value;
39 39
                     if (ucfirst($key) === basename(get_class($this)).'_id') {
40 40
                         $this->{'id'} = $value;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public function __call(string $name, array $arguments) {
49 49
         $name = strtolower($name);
50 50
         if (str_starts_with($name, 'set')) {
51
-            $name = substr($name,3);
51
+            $name = substr($name, 3);
52 52
             if (isset($arguments[0])) {
53 53
                 $this->$name = $arguments[0];
54 54
             }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,24 +17,20 @@  discard block
 block discarded – undo
17 17
         foreach ($object as $key=>$value) {
18 18
             if (isset($subs[$key])) {
19 19
                 $this->$key = new ($subs[$key]) ($value);
20
-            }
21
-            else {
20
+            } else {
22 21
                 if (is_array($value) && isset($subs['array'])) {
23 22
                     foreach ($value as $sub_key=>$sub_value) {
24 23
                         if (is_array($sub_value) && isset($subs['array']['array'])) {
25 24
                             foreach ($sub_value as $sub2_value) {
26 25
                                 $this->$key[$sub_key][] = new ($subs['array']['array'][$key]) ($sub2_value);
27 26
                             }
28
-                        }
29
-                        elseif(isset($subs['array'][$key])){
27
+                        } elseif(isset($subs['array'][$key])){
30 28
                             $this->$key[] = new ($subs['array'][$key]) ($sub_value);
31
-                        }
32
-                        else {
29
+                        } else {
33 30
                             $this->$key[] = $sub_value;
34 31
                         }
35 32
                     }
36
-                }
37
-                else{
33
+                } else{
38 34
                     $this->$key = $value;
39 35
                     if (ucfirst($key) === basename(get_class($this)).'_id') {
40 36
                         $this->{'id'} = $value;
@@ -51,8 +47,7 @@  discard block
 block discarded – undo
51 47
             $name = substr($name,3);
52 48
             if (isset($arguments[0])) {
53 49
                 $this->$name = $arguments[0];
54
-            }
55
-            elseif (isset($arguments['value'])) {
50
+            } elseif (isset($arguments['value'])) {
56 51
                 $this->$name = $arguments['value'];
57 52
             }
58 53
         }
Please login to merge, or discard this patch.
src/types/chatPermissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public bool $can_manage_topics;
68 68
 
69 69
 
70
-    public function __construct(stdClass|null $object = null) {
70
+    public function __construct(stdClass | null $object = null) {
71 71
         if ($object != null) {
72 72
             parent::__construct($object, self::subs);
73 73
         }
Please login to merge, or discard this patch.
src/types/forumTopicCreated.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
     public int $icon_color;
19 19
 
20 20
     /** Optional. Unique identifier of the custom emoji shown as the topic icon */
21
-    public null|string $icon_custom_emoji_id = null;
21
+    public null | string $icon_custom_emoji_id = null;
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.