@@ -36,7 +36,7 @@ |
||
36 | 36 | * Factory constructor that handles nulls |
37 | 37 | * |
38 | 38 | * @param mixed $value |
39 | - * @return JsonNull|JsonPrimitive |
|
39 | + * @return JsonElement |
|
40 | 40 | */ |
41 | 41 | public static function create($value) |
42 | 42 | { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * Read the next value, convert it to its type and return it |
29 | 29 | * |
30 | 30 | * @param JsonReadable $reader |
31 | - * @return mixed |
|
31 | + * @return JsonElement |
|
32 | 32 | * @throws \LogicException If the token can not be handled |
33 | 33 | */ |
34 | 34 | public function read(JsonReadable $reader): JsonElement |
@@ -94,6 +94,7 @@ |
||
94 | 94 | * Sets whether nulls are serialized |
95 | 95 | * |
96 | 96 | * @param bool $serializeNull |
97 | + * @return void |
|
97 | 98 | */ |
98 | 99 | public function setSerializeNull(bool $serializeNull): void; |
99 | 100 | } |
@@ -197,7 +197,7 @@ |
||
197 | 197 | * |
198 | 198 | * @return string |
199 | 199 | */ |
200 | - public function getClass(): ?string |
|
200 | + public function getClass(): ? string |
|
201 | 201 | { |
202 | 202 | return $this->class; |
203 | 203 | } |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | public function setCacheDir(string $cacheDir): GsonBuilder |
295 | 295 | { |
296 | - $this->cacheDir = $cacheDir.'/gson'; |
|
296 | + $this->cacheDir = $cacheDir . '/gson'; |
|
297 | 297 | |
298 | 298 | return $this; |
299 | 299 | } |
@@ -309,17 +309,17 @@ discard block |
||
309 | 309 | $propertyNamingStrategy = $this->propertyNamingStrategy ?? new SnakePropertyNamingStrategy(); |
310 | 310 | $methodNamingStrategy = $this->methodNamingStrategy ?? new UpperCaseMethodNamingStrategy(); |
311 | 311 | |
312 | - $doctrineAnnotationCache = null === $this->cacheDir ? new ArrayCache(): new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
312 | + $doctrineAnnotationCache = null === $this->cacheDir ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
313 | 313 | $doctrineAnnotationCache->setNamespace('doctrine_annotation_cache'); |
314 | 314 | $reader = new CachedReader(new AnnotationReader(), $doctrineAnnotationCache); |
315 | 315 | |
316 | 316 | $cache = null === $this->cacheDir ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
317 | 317 | $cache->setNamespace('property_collection_cache'); |
318 | 318 | |
319 | - $annotationCache = null === $this->cacheDir ? new ArrayCache(): new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
319 | + $annotationCache = null === $this->cacheDir ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
320 | 320 | $annotationCache->setNamespace('annotation_cache'); |
321 | 321 | |
322 | - $typeAdapterCache = null === $this->cacheDir ? new ArrayCache(): new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
322 | + $typeAdapterCache = null === $this->cacheDir ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
323 | 323 | $typeAdapterCache->setNamespace('type_adapter_cache'); |
324 | 324 | |
325 | 325 | $annotationCollectionFactory = new AnnotationCollectionFactory($reader, $annotationCache); |