Passed
Pull Request — master (#1320)
by
unknown
03:09
created
src/Annotation/ExclusionPolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $value = $policy;
38 38
         }
39 39
 
40
-        if (!\is_string($value)) {
40
+        if ( ! \is_string($value)) {
41 41
             throw new RuntimeException('Exclusion policy value must be of string type.');
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Annotation/ReadOnly.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
             }
29 29
         }
30 30
 
31
-        $this->readOnly =  $readOnly;
31
+        $this->readOnly = $readOnly;
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
src/SerializerBuilder.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
     private function getAccessorStrategy(): AccessorStrategyInterface
217 217
     {
218
-        if (!$this->accessorStrategy) {
218
+        if ( ! $this->accessorStrategy) {
219 219
             $this->accessorStrategy = new DefaultAccessorStrategy($this->expressionEvaluator);
220 220
         }
221 221
 
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
 
253 253
     public function setCacheDir(string $dir): self
254 254
     {
255
-        if (!is_dir($dir)) {
255
+        if ( ! is_dir($dir)) {
256 256
             $this->createDir($dir);
257 257
         }
258 258
 
259
-        if (!is_writable($dir)) {
259
+        if ( ! is_writable($dir)) {
260 260
             throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
261 261
         }
262 262
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     public function setMetadataDirs(array $namespacePrefixToDirMap): self
379 379
     {
380 380
         foreach ($namespacePrefixToDirMap as $dir) {
381
-            if (!is_dir($dir)) {
381
+            if ( ! is_dir($dir)) {
382 382
                 throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
383 383
             }
384 384
         }
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
      */
417 417
     public function addMetadataDir(string $dir, string $namespacePrefix = ''): self
418 418
     {
419
-        if (!is_dir($dir)) {
419
+        if ( ! is_dir($dir)) {
420 420
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
421 421
         }
422 422
 
@@ -455,11 +455,11 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function replaceMetadataDir(string $dir, string $namespacePrefix = ''): self
457 457
     {
458
-        if (!is_dir($dir)) {
458
+        if ( ! is_dir($dir)) {
459 459
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
460 460
         }
461 461
 
462
-        if (!isset($this->metadataDirs[$namespacePrefix])) {
462
+        if ( ! isset($this->metadataDirs[$namespacePrefix])) {
463 463
             throw new InvalidArgumentException(sprintf('There is no directory configured for namespace prefix "%s". Please use addMetadataDir() for adding new directories.', $namespacePrefix));
464 464
         }
465 465
 
@@ -535,12 +535,12 @@  discard block
 block discarded – undo
535 535
                 $annotationReader = new AnnotationReader();
536 536
 
537 537
                 if (null !== $this->cacheDir) {
538
-                    $this->createDir($this->cacheDir . '/annotations');
538
+                    $this->createDir($this->cacheDir.'/annotations');
539 539
                     if (class_exists(FilesystemAdapter::class)) {
540
-                        $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir . '/annotations');
540
+                        $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir.'/annotations');
541 541
                         $annotationReader = new PsrCachedReader($annotationReader, $annotationsCache, $this->debug);
542 542
                     } else {
543
-                        $annotationsCache = new FilesystemCache($this->cacheDir . '/annotations');
543
+                        $annotationsCache = new FilesystemCache($this->cacheDir.'/annotations');
544 544
                         $annotationReader = new CachedReader($annotationReader, $annotationsCache, $this->debug);
545 545
                     }
546 546
                 }
@@ -568,19 +568,19 @@  discard block
 block discarded – undo
568 568
         if (null !== $this->metadataCache) {
569 569
             $metadataFactory->setCache($this->metadataCache);
570 570
         } elseif (null !== $this->cacheDir) {
571
-            $this->createDir($this->cacheDir . '/metadata');
572
-            $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata'));
571
+            $this->createDir($this->cacheDir.'/metadata');
572
+            $metadataFactory->setCache(new FileCache($this->cacheDir.'/metadata'));
573 573
         }
574 574
 
575
-        if (!$this->handlersConfigured) {
575
+        if ( ! $this->handlersConfigured) {
576 576
             $this->addDefaultHandlers();
577 577
         }
578 578
 
579
-        if (!$this->listenersConfigured) {
579
+        if ( ! $this->listenersConfigured) {
580 580
             $this->addDefaultListeners();
581 581
         }
582 582
 
583
-        if (!$this->visitorsAdded) {
583
+        if ( ! $this->visitorsAdded) {
584 584
             $this->addDefaultSerializationVisitors();
585 585
             $this->addDefaultDeserializationVisitors();
586 586
         }
Please login to merge, or discard this patch.