x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Passed
Push — main ( 21f878...926a07 )
by Miaad
10:33
created
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.