Passed
Pull Request — master (#1332)
by Asmir
02:32
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
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
             $readOnly = $values['readOnly'];
27 27
         }
28 28
 
29
-        $this->readOnly =  $readOnly;
29
+        $this->readOnly = $readOnly;
30 30
     }
31 31
 }
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
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
     private function getAccessorStrategy(): AccessorStrategyInterface
218 218
     {
219
-        if (!$this->accessorStrategy) {
219
+        if ( ! $this->accessorStrategy) {
220 220
             $this->accessorStrategy = new DefaultAccessorStrategy($this->expressionEvaluator);
221 221
         }
222 222
 
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
 
261 261
     public function setCacheDir(string $dir): self
262 262
     {
263
-        if (!is_dir($dir)) {
263
+        if ( ! is_dir($dir)) {
264 264
             $this->createDir($dir);
265 265
         }
266 266
 
267
-        if (!is_writable($dir)) {
267
+        if ( ! is_writable($dir)) {
268 268
             throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
269 269
         }
270 270
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
     public function setMetadataDirs(array $namespacePrefixToDirMap): self
387 387
     {
388 388
         foreach ($namespacePrefixToDirMap as $dir) {
389
-            if (!is_dir($dir)) {
389
+            if ( ! is_dir($dir)) {
390 390
                 throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
391 391
             }
392 392
         }
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
      */
425 425
     public function addMetadataDir(string $dir, string $namespacePrefix = ''): self
426 426
     {
427
-        if (!is_dir($dir)) {
427
+        if ( ! is_dir($dir)) {
428 428
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
429 429
         }
430 430
 
@@ -463,11 +463,11 @@  discard block
 block discarded – undo
463 463
      */
464 464
     public function replaceMetadataDir(string $dir, string $namespacePrefix = ''): self
465 465
     {
466
-        if (!is_dir($dir)) {
466
+        if ( ! is_dir($dir)) {
467 467
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
468 468
         }
469 469
 
470
-        if (!isset($this->metadataDirs[$namespacePrefix])) {
470
+        if ( ! isset($this->metadataDirs[$namespacePrefix])) {
471 471
             throw new InvalidArgumentException(sprintf('There is no directory configured for namespace prefix "%s". Please use addMetadataDir() for adding new directories.', $namespacePrefix));
472 472
         }
473 473
 
@@ -566,19 +566,19 @@  discard block
 block discarded – undo
566 566
         if (null !== $this->metadataCache) {
567 567
             $metadataFactory->setCache($this->metadataCache);
568 568
         } elseif (null !== $this->cacheDir) {
569
-            $this->createDir($this->cacheDir . '/metadata');
570
-            $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata'));
569
+            $this->createDir($this->cacheDir.'/metadata');
570
+            $metadataFactory->setCache(new FileCache($this->cacheDir.'/metadata'));
571 571
         }
572 572
 
573
-        if (!$this->handlersConfigured) {
573
+        if ( ! $this->handlersConfigured) {
574 574
             $this->addDefaultHandlers();
575 575
         }
576 576
 
577
-        if (!$this->listenersConfigured) {
577
+        if ( ! $this->listenersConfigured) {
578 578
             $this->addDefaultListeners();
579 579
         }
580 580
 
581
-        if (!$this->visitorsAdded) {
581
+        if ( ! $this->visitorsAdded) {
582 582
             $this->addDefaultSerializationVisitors();
583 583
             $this->addDefaultDeserializationVisitors();
584 584
         }
@@ -645,12 +645,12 @@  discard block
 block discarded – undo
645 645
     private function decorateAnnotationReader(Reader $annotationReader): Reader
646 646
     {
647 647
         if (null !== $this->cacheDir) {
648
-            $this->createDir($this->cacheDir . '/annotations');
648
+            $this->createDir($this->cacheDir.'/annotations');
649 649
             if (class_exists(FilesystemAdapter::class)) {
650
-                $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir . '/annotations');
650
+                $annotationsCache = new FilesystemAdapter('', 0, $this->cacheDir.'/annotations');
651 651
                 $annotationReader = new PsrCachedReader($annotationReader, $annotationsCache, $this->debug);
652 652
             } else {
653
-                $annotationsCache = new FilesystemCache($this->cacheDir . '/annotations');
653
+                $annotationsCache = new FilesystemCache($this->cacheDir.'/annotations');
654 654
                 $annotationReader = new CachedReader($annotationReader, $annotationsCache, $this->debug);
655 655
             }
656 656
         }
Please login to merge, or discard this patch.