Passed
Push — master ( 09fa4e...8aa2ec )
by Fran
02:59
created
src/base/dto/Dto.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
                             }
59 59
                         }
60 60
                         $dto[$property->getName()] = $value;
61
-                    } else {
61
+                    }else {
62 62
                         $type = InjectorHelper::extractVarType($property->getDocComment());
63 63
                         $dto[$property->getName()] = $this->checkCastedValue($property->getValue($this), $type ?: 'string');
64 64
                     }
65 65
                 }
66 66
             }
67
-        } catch (\Exception $e) {
68
-            Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
67
+        }catch (\Exception $e) {
68
+            Logger::log(get_class($this).': '.$e->getMessage(), LOG_ERR);
69 69
         }
70 70
         return $dto;
71 71
     }
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
                             $this->$key[] = $dto;
103 103
                         }
104 104
                     }
105
-                } else {
105
+                }else {
106 106
                     $this->$key = clone $this->__cache[$type];
107 107
                     $this->$key->fromArray($value);
108 108
                 }
109 109
             }
110
-        } else {
110
+        }else {
111 111
             $this->castValue($key, $value, $type);
112 112
         }
113 113
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     /**
135 135
      * @return mixed
136 136
      */
137
-    public function jsonSerialize(): array|string|null
137
+    public function jsonSerialize(): array | string | null
138 138
     {
139 139
         return $this->toArray();
140 140
     }
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
                 default:
181 181
                 case 'string':
182 182
                     // Cleaning HTML dangerous tags
183
-                    if(is_array($rawValue)) {
184
-                        foreach($rawValue as &$item) {
183
+                    if (is_array($rawValue)) {
184
+                        foreach ($rawValue as &$item) {
185 185
                             $item = $this->checkCastedValue($item, $type);
186 186
                         }
187 187
                         $value = $rawValue;
188
-                    } elseif(is_string($rawValue)) {
188
+                    } elseif (is_string($rawValue)) {
189 189
                         $value = I18nHelper::cleanHtmlAttacks($rawValue);
190
-                    } else {
190
+                    }else {
191 191
                         $value = $rawValue;
192 192
                     }
193 193
                     break;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                     $value = (bool)$rawValue;
205 205
                     break;
206 206
             }
207
-        } else {
207
+        }else {
208 208
             $value = $rawValue;
209 209
         }
210 210
         return $value;
Please login to merge, or discard this patch.