@@ -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 | } |
@@ -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); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * |
199 | 199 | * @return string |
200 | 200 | */ |
201 | - public function getClass(): ?string |
|
201 | + public function getClass(): ? string |
|
202 | 202 | { |
203 | 203 | return $this->class; |
204 | 204 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | { |
325 | 325 | return [] === $this->options |
326 | 326 | ? $this->fullType |
327 | - : $this->fullType.serialize($this->options); |
|
327 | + : $this->fullType . serialize($this->options); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | /** |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * @param string $name |
40 | 40 | * @return PropertyMetadata |
41 | 41 | */ |
42 | - public function get(string $name): ?PropertyMetadata |
|
42 | + public function get(string $name): ? PropertyMetadata |
|
43 | 43 | { |
44 | 44 | if (!array_key_exists($name, $this->properties)) { |
45 | 45 | return null; |