@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | private function getAccessorStrategy(): AccessorStrategyInterface |
| 209 | 209 | { |
| 210 | - if (!$this->accessorStrategy) { |
|
| 210 | + if ( ! $this->accessorStrategy) { |
|
| 211 | 211 | $this->accessorStrategy = new DefaultAccessorStrategy($this->expressionEvaluator); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -244,11 +244,11 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | public function setCacheDir(string $dir): self |
| 246 | 246 | { |
| 247 | - if (!is_dir($dir)) { |
|
| 247 | + if ( ! is_dir($dir)) { |
|
| 248 | 248 | $this->createDir($dir); |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | - if (!is_writable($dir)) { |
|
| 251 | + if ( ! is_writable($dir)) { |
|
| 252 | 252 | throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir)); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | public function setMetadataDirs(array $namespacePrefixToDirMap): self |
| 371 | 371 | { |
| 372 | 372 | foreach ($namespacePrefixToDirMap as $dir) { |
| 373 | - if (!is_dir($dir)) { |
|
| 373 | + if ( ! is_dir($dir)) { |
|
| 374 | 374 | throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir)); |
| 375 | 375 | } |
| 376 | 376 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | */ |
| 409 | 409 | public function addMetadataDir(string $dir, string $namespacePrefix = ''): self |
| 410 | 410 | { |
| 411 | - if (!is_dir($dir)) { |
|
| 411 | + if ( ! is_dir($dir)) { |
|
| 412 | 412 | throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir)); |
| 413 | 413 | } |
| 414 | 414 | |
@@ -447,11 +447,11 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | public function replaceMetadataDir(string $dir, string $namespacePrefix = ''): self |
| 449 | 449 | { |
| 450 | - if (!is_dir($dir)) { |
|
| 450 | + if ( ! is_dir($dir)) { |
|
| 451 | 451 | throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir)); |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | - if (!isset($this->metadataDirs[$namespacePrefix])) { |
|
| 454 | + if ( ! isset($this->metadataDirs[$namespacePrefix])) { |
|
| 455 | 455 | throw new InvalidArgumentException(sprintf('There is no directory configured for namespace prefix "%s". Please use addMetadataDir() for adding new directories.', $namespacePrefix)); |
| 456 | 456 | } |
| 457 | 457 | |
@@ -524,8 +524,8 @@ discard block |
||
| 524 | 524 | $annotationReader = new AnnotationReader(); |
| 525 | 525 | |
| 526 | 526 | if (null !== $this->cacheDir) { |
| 527 | - $this->createDir($this->cacheDir . '/annotations'); |
|
| 528 | - $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir . '/annotations'); |
|
| 527 | + $this->createDir($this->cacheDir.'/annotations'); |
|
| 528 | + $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir.'/annotations'); |
|
| 529 | 529 | $annotationReader = new PsrCachedReader($annotationReader, $annotationsCache, $this->debug); |
| 530 | 530 | } |
| 531 | 531 | } |
@@ -551,19 +551,19 @@ discard block |
||
| 551 | 551 | if (null !== $this->metadataCache) { |
| 552 | 552 | $metadataFactory->setCache($this->metadataCache); |
| 553 | 553 | } elseif (null !== $this->cacheDir) { |
| 554 | - $this->createDir($this->cacheDir . '/metadata'); |
|
| 555 | - $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata')); |
|
| 554 | + $this->createDir($this->cacheDir.'/metadata'); |
|
| 555 | + $metadataFactory->setCache(new FileCache($this->cacheDir.'/metadata')); |
|
| 556 | 556 | } |
| 557 | 557 | |
| 558 | - if (!$this->handlersConfigured) { |
|
| 558 | + if ( ! $this->handlersConfigured) { |
|
| 559 | 559 | $this->addDefaultHandlers(); |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | - if (!$this->listenersConfigured) { |
|
| 562 | + if ( ! $this->listenersConfigured) { |
|
| 563 | 563 | $this->addDefaultListeners(); |
| 564 | 564 | } |
| 565 | 565 | |
| 566 | - if (!$this->visitorsAdded) { |
|
| 566 | + if ( ! $this->visitorsAdded) { |
|
| 567 | 567 | $this->addDefaultSerializationVisitors(); |
| 568 | 568 | $this->addDefaultDeserializationVisitors(); |
| 569 | 569 | } |