@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | // for setters, we look for the param name as well |
| 171 | - $pattern = '/@'.$annotation.'\s+([a-zA-Z0-9|\[\]\\\\]+)'; |
|
| 171 | + $pattern = '/@' . $annotation . '\s+([a-zA-Z0-9|\[\]\\\\]+)'; |
|
| 172 | 172 | if ($parameter !== null) { |
| 173 | - $pattern .= '\s+\$'.$parameter; |
|
| 173 | + $pattern .= '\s+\$' . $parameter; |
|
| 174 | 174 | } |
| 175 | 175 | $pattern .= '/'; |
| 176 | 176 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | // return the non-null type |
| 201 | - foreach(\explode('|', $type) as $potentialType) { |
|
| 201 | + foreach (\explode('|', $type) as $potentialType) { |
|
| 202 | 202 | $potentialType = \trim($potentialType); |
| 203 | 203 | if (\strtolower($potentialType) !== 'null') { |
| 204 | 204 | return $potentialType; |
@@ -278,15 +278,15 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | // group use statement |
| 280 | 280 | if (!empty($matches['group'])) { |
| 281 | - return TypeToken::create($matches['group'].$type); |
|
| 281 | + return TypeToken::create($matches['group'] . $type); |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | // grouped aliased use statement |
| 285 | 285 | if (!empty($matches['namespace']) && !empty($matches['classname'])) { |
| 286 | - return TypeToken::create($matches['namespace'].$matches['classname']); |
|
| 286 | + return TypeToken::create($matches['namespace'] . $matches['classname']); |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | - return TypeToken::create($namespace.'\\'.$type); |
|
| 289 | + return TypeToken::create($namespace . '\\' . $type); |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | public function create(TypeToken $phpType, ClassMetadata $classMetadata): PropertyCollection |
| 117 | 117 | { |
| 118 | 118 | $class = $phpType->getRawType(); |
| 119 | - $key = 'gson.properties.'.\str_replace('\\', '', $class); |
|
| 119 | + $key = 'gson.properties.' . \str_replace('\\', '', $class); |
|
| 120 | 120 | |
| 121 | 121 | $data = $this->cache->get($key); |
| 122 | 122 | if ($data !== null) { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | for ($index = 1; $index <= $this->pathIndex; $index++) { |
| 209 | 209 | if (!empty($this->pathNames[$index])) { |
| 210 | - $result[] .= '.'.$this->pathNames[$index]; |
|
| 210 | + $result[] .= '.' . $this->pathNames[$index]; |
|
| 211 | 211 | continue; |
| 212 | 212 | } |
| 213 | 213 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | continue; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $result[] .= '['.$this->pathIndices[$index].']'; |
|
| 219 | + $result[] .= '[' . $this->pathIndices[$index] . ']'; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | return implode($result); |