@@ -58,14 +58,14 @@ discard block |
||
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 |
||
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 |
||
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,12 +180,12 @@ discard block |
||
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 | - } else { |
|
188 | + }else { |
|
189 | 189 | $value = I18nHelper::cleanHtmlAttacks($rawValue); |
190 | 190 | } |
191 | 191 | break; |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $value = (bool)$rawValue; |
203 | 203 | break; |
204 | 204 | } |
205 | - } else { |
|
205 | + }else { |
|
206 | 206 | $value = $rawValue; |
207 | 207 | } |
208 | 208 | return $value; |