Passed
Pull Request — master (#1328)
by
unknown
02:50
created
src/SerializerBuilder.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
     private function getAccessorStrategy(): AccessorStrategyInterface
211 211
     {
212
-        if (!$this->accessorStrategy) {
212
+        if ( ! $this->accessorStrategy) {
213 213
             $this->accessorStrategy = new DefaultAccessorStrategy($this->expressionEvaluator);
214 214
         }
215 215
 
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
 
247 247
     public function setCacheDir(string $dir): self
248 248
     {
249
-        if (!is_dir($dir)) {
249
+        if ( ! is_dir($dir)) {
250 250
             $this->createDir($dir);
251 251
         }
252 252
 
253
-        if (!is_writable($dir)) {
253
+        if ( ! is_writable($dir)) {
254 254
             throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
255 255
         }
256 256
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
     public function setMetadataDirs(array $namespacePrefixToDirMap): self
373 373
     {
374 374
         foreach ($namespacePrefixToDirMap as $dir) {
375
-            if (!is_dir($dir)) {
375
+            if ( ! is_dir($dir)) {
376 376
                 throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
377 377
             }
378 378
         }
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
      */
411 411
     public function addMetadataDir(string $dir, string $namespacePrefix = ''): self
412 412
     {
413
-        if (!is_dir($dir)) {
413
+        if ( ! is_dir($dir)) {
414 414
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
415 415
         }
416 416
 
@@ -449,11 +449,11 @@  discard block
 block discarded – undo
449 449
      */
450 450
     public function replaceMetadataDir(string $dir, string $namespacePrefix = ''): self
451 451
     {
452
-        if (!is_dir($dir)) {
452
+        if ( ! is_dir($dir)) {
453 453
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
454 454
         }
455 455
 
456
-        if (!isset($this->metadataDirs[$namespacePrefix])) {
456
+        if ( ! isset($this->metadataDirs[$namespacePrefix])) {
457 457
             throw new InvalidArgumentException(sprintf('There is no directory configured for namespace prefix "%s". Please use addMetadataDir() for adding new directories.', $namespacePrefix));
458 458
         }
459 459
 
@@ -526,12 +526,12 @@  discard block
 block discarded – undo
526 526
             $annotationReader = new AnnotationReader();
527 527
 
528 528
             if (null !== $this->cacheDir) {
529
-                $this->createDir($this->cacheDir . '/annotations');
529
+                $this->createDir($this->cacheDir.'/annotations');
530 530
                 if (class_exists(FilesystemAdapter::class)) {
531
-                    $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir . '/annotations');
531
+                    $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir.'/annotations');
532 532
                     $annotationReader = new PsrCachedReader($annotationReader, $annotationsCache, $this->debug);
533 533
                 } else {
534
-                    $annotationsCache = new FilesystemCache($this->cacheDir . '/annotations');
534
+                    $annotationsCache = new FilesystemCache($this->cacheDir.'/annotations');
535 535
                     $annotationReader = new CachedReader($annotationReader, $annotationsCache, $this->debug);
536 536
                 }
537 537
             }
@@ -558,19 +558,19 @@  discard block
 block discarded – undo
558 558
         if (null !== $this->metadataCache) {
559 559
             $metadataFactory->setCache($this->metadataCache);
560 560
         } elseif (null !== $this->cacheDir) {
561
-            $this->createDir($this->cacheDir . '/metadata');
562
-            $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata'));
561
+            $this->createDir($this->cacheDir.'/metadata');
562
+            $metadataFactory->setCache(new FileCache($this->cacheDir.'/metadata'));
563 563
         }
564 564
 
565
-        if (!$this->handlersConfigured) {
565
+        if ( ! $this->handlersConfigured) {
566 566
             $this->addDefaultHandlers();
567 567
         }
568 568
 
569
-        if (!$this->listenersConfigured) {
569
+        if ( ! $this->listenersConfigured) {
570 570
             $this->addDefaultListeners();
571 571
         }
572 572
 
573
-        if (!$this->visitorsAdded) {
573
+        if ( ! $this->visitorsAdded) {
574 574
             $this->addDefaultSerializationVisitors();
575 575
             $this->addDefaultDeserializationVisitors();
576 576
         }
Please login to merge, or discard this patch.