Passed
Push — main ( 41e5bc...ca9ae3 )
by Miaad
01:45
created
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.
src/types/game.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,19 +32,19 @@
 block discarded – undo
32 32
      * edited to include current high scores for the game when the bot calls setGameScore, or manually edited using
33 33
      * editMessageText. 0-4096 characters.
34 34
      */
35
-    public null|string $text = null;
35
+    public null | string $text = null;
36 36
 
37 37
     /**
38 38
      * Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
39 39
      * @var messageEntity[]
40 40
      */
41
-    public null|array $text_entities = null;
41
+    public null | array $text_entities = null;
42 42
 
43 43
     /** Optional. Animation that will be displayed in the game message in chats. Upload via BotFather */
44
-    public null|animation $animation = null;
44
+    public null | animation $animation = null;
45 45
 
46 46
 
47
-    public function __construct(stdClass|null $object = null) {
47
+    public function __construct(stdClass | null $object = null) {
48 48
         if ($object != null) {
49 49
             parent::__construct($object, self::subs);
50 50
         }
Please login to merge, or discard this patch.