@@ -48,12 +48,12 @@ |
||
| 48 | 48 | if (null !== $setterMethod && [] !== $setterMethod->getParameters()) { |
| 49 | 49 | $parameter = $setterMethod->getParameters()[0]; |
| 50 | 50 | if (null !== $parameter->getType()) { |
| 51 | - return new TypeToken((string) $parameter->getType()); |
|
| 51 | + return new TypeToken((string)$parameter->getType()); |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | if (null !== $getterMethod && null !== $getterMethod->getReturnType()) { |
| 56 | - return new TypeToken((string) $getterMethod->getReturnType()); |
|
| 56 | + return new TypeToken((string)$getterMethod->getReturnType()); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | if (null !== $setterMethod && [] !== $setterMethod->getParameters()) { |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | */ |
| 137 | 137 | public function getTypeName(): string |
| 138 | 138 | { |
| 139 | - return (string) $this->type; |
|
| 139 | + return (string)$this->type; |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
@@ -211,11 +211,11 @@ |
||
| 211 | 211 | $result = '$'; |
| 212 | 212 | foreach ($this->stack as $index => $item) { |
| 213 | 213 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
| 214 | - $result .= '['.$this->pathIndices[$index].']'; |
|
| 214 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) { |
| 218 | - $result .= '.'.$this->pathNames[$index]; |
|
| 218 | + $result .= '.' . $this->pathNames[$index]; |
|
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @throws \Tebru\Gson\Exception\JsonSyntaxException If trying to read from non object/array |
| 55 | 55 | * @throws \Tebru\PhpType\Exception\MalformedTypeException If the type cannot be parsed |
| 56 | 56 | */ |
| 57 | - public function read(JsonReadable $reader): ?array |
|
| 57 | + public function read(JsonReadable $reader): ? array |
|
| 58 | 58 | { |
| 59 | 59 | if ($reader->peek() === JsonToken::NULL) { |
| 60 | 60 | return $reader->nextNull(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param JsonReadable $reader |
| 25 | 25 | * @return string|null |
| 26 | 26 | */ |
| 27 | - public function read(JsonReadable $reader): ?string |
|
| 27 | + public function read(JsonReadable $reader): ? string |
|
| 28 | 28 | { |
| 29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
| 30 | 30 | return $reader->nextNull(); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @return DateTime|null |
| 51 | 51 | * @throws \Tebru\Gson\Exception\JsonSyntaxException If the DateTime could not be created from format |
| 52 | 52 | */ |
| 53 | - public function read(JsonReadable $reader): ?DateTime |
|
| 53 | + public function read(JsonReadable $reader): ? DateTime |
|
| 54 | 54 | { |
| 55 | 55 | if ($reader->peek() === JsonToken::NULL) { |
| 56 | 56 | return $reader->nextNull(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param JsonReadable $reader |
| 25 | 25 | * @return bool|null |
| 26 | 26 | */ |
| 27 | - public function read(JsonReadable $reader): ?bool |
|
| 27 | + public function read(JsonReadable $reader): ? bool |
|
| 28 | 28 | { |
| 29 | 29 | if ($reader->peek() === JsonToken::NULL) { |
| 30 | 30 | return $reader->nextNull(); |