@@ -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); |