Passed
Pull Request — master (#72)
by
unknown
04:18
created
src/Metadata/Driver/DriverChain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             if (!$driver instanceof AdvancedDriverInterface) {
40 40
                 throw new \RuntimeException(
41 41
                     sprintf(
42
-                        'Driver "%s" must be an instance of "AdvancedDriverInterface" to use ' .
42
+                        'Driver "%s" must be an instance of "AdvancedDriverInterface" to use '.
43 43
                         '"DriverChain::getAllClassNames()".',
44 44
                         get_class($driver)
45 45
                     )
Please login to merge, or discard this patch.
src/Metadata/Cache/PsrCacheAdapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function load(string $class): ?ClassMetadata
24 24
     {
25
-        $this->lastItem = $this->pool->getItem(strtr($this->prefix . $class, '\\', '.'));
25
+        $this->lastItem = $this->pool->getItem(strtr($this->prefix.$class, '\\', '.'));
26 26
 
27 27
         return $this->lastItem->get();
28 28
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function put(ClassMetadata $metadata): void
34 34
     {
35
-        $key = strtr($this->prefix . $metadata->name, '\\', '.');
35
+        $key = strtr($this->prefix.$metadata->name, '\\', '.');
36 36
 
37 37
         if (null === $this->lastItem || $this->lastItem->getKey() !== $key) {
38 38
             $this->lastItem = $this->pool->getItem($key);
@@ -46,6 +46,6 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function evict(string $class): void
48 48
     {
49
-        $this->pool->deleteItem(strtr($this->prefix . $class, '\\', '.'));
49
+        $this->pool->deleteItem(strtr($this->prefix.$class, '\\', '.'));
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Metadata/Cache/DoctrineCacheAdapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function load(string $class): ?ClassMetadata
36 36
     {
37
-        $cache = $this->cache->fetch($this->prefix . $class);
37
+        $cache = $this->cache->fetch($this->prefix.$class);
38 38
         return false === $cache ? null : $cache;
39 39
     }
40 40
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function put(ClassMetadata $metadata): void
45 45
     {
46
-        $this->cache->save($this->prefix . $metadata->name, $metadata);
46
+        $this->cache->save($this->prefix.$metadata->name, $metadata);
47 47
     }
48 48
 
49 49
     /**
@@ -51,6 +51,6 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function evict(string $class): void
53 53
     {
54
-        $this->cache->delete($this->prefix . $class);
54
+        $this->cache->delete($this->prefix.$class);
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
src/Metadata/Driver/FileLocator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             }
28 28
 
29 29
             $len = '' === $prefix ? 0 : strlen($prefix) + 1;
30
-            $path = $dir . '/' . str_replace('\\', '.', substr($class->name, $len)) . '.' . $extension;
30
+            $path = $dir.'/'.str_replace('\\', '.', substr($class->name, $len)).'.'.$extension;
31 31
             if (file_exists($path)) {
32 32
                 return $path;
33 33
             }
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
                 new \RecursiveDirectoryIterator($dir),
49 49
                 \RecursiveIteratorIterator::LEAVES_ONLY
50 50
             );
51
-            $nsPrefix = '' !== $prefix ? $prefix . '\\' : '';
51
+            $nsPrefix = '' !== $prefix ? $prefix.'\\' : '';
52 52
             foreach ($iterator as $file) {
53
-                if (($fileName = $file->getBasename('.' . $extension)) === $file->getBasename()) {
53
+                if (($fileName = $file->getBasename('.'.$extension)) === $file->getBasename()) {
54 54
                     continue;
55 55
                 }
56 56
 
57
-                $classes[] = $nsPrefix . str_replace('.', '\\', $fileName);
57
+                $classes[] = $nsPrefix.str_replace('.', '\\', $fileName);
58 58
             }
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/Metadata/Cache/FileCache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function load(string $class): ?ClassMetadata
29 29
     {
30
-        $path = $this->dir . '/' . strtr($class, '\\', '-') . '.cache.php';
30
+        $path = $this->dir.'/'.strtr($class, '\\', '-').'.cache.php';
31 31
         if (!file_exists($path)) {
32 32
             return null;
33 33
         }
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
             throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable.', $this->dir));
45 45
         }
46 46
 
47
-        $path = $this->dir . '/' . strtr($metadata->name, '\\', '-') . '.cache.php';
47
+        $path = $this->dir.'/'.strtr($metadata->name, '\\', '-').'.cache.php';
48 48
 
49 49
         $tmpFile = tempnam($this->dir, 'metadata-cache');
50
-        file_put_contents($tmpFile, '<?php return unserialize(' . var_export(serialize($metadata), true) . ');');
50
+        file_put_contents($tmpFile, '<?php return unserialize('.var_export(serialize($metadata), true).');');
51 51
 
52 52
         // Let's not break filesystems which do not support chmod.
53 53
         @chmod($tmpFile, 0666 & ~umask());
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function evict(string $class): void
82 82
     {
83
-        $path = $this->dir . '/' . strtr($class, '\\', '-') . '.cache.php';
83
+        $path = $this->dir.'/'.strtr($class, '\\', '-').'.cache.php';
84 84
         if (file_exists($path)) {
85 85
             unlink($path);
86 86
         }
Please login to merge, or discard this patch.