@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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 |
@@ -39,7 +39,7 @@ |
||
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 | ) |
@@ -30,19 +30,19 @@ |
||
30 | 30 | |
31 | 31 | public function load(string $class): ?ClassMetadata |
32 | 32 | { |
33 | - $cache = $this->cache->fetch($this->prefix . $class); |
|
33 | + $cache = $this->cache->fetch($this->prefix.$class); |
|
34 | 34 | |
35 | 35 | return false === $cache ? null : $cache; |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function put(ClassMetadata $metadata): void |
39 | 39 | { |
40 | - $this->cache->save($this->prefix . $metadata->name, $metadata); |
|
40 | + $this->cache->save($this->prefix.$metadata->name, $metadata); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function evict(string $class): void |
44 | 44 | { |
45 | - $this->cache->delete($this->prefix . $class); |
|
45 | + $this->cache->delete($this->prefix.$class); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function clear(): bool |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | return; |
61 | 61 | } |
62 | 62 | |
63 | - $data = '<?php return unserialize(' . var_export(serialize($metadata), true) . ');'; |
|
63 | + $data = '<?php return unserialize('.var_export(serialize($metadata), true).');'; |
|
64 | 64 | $bytesWritten = file_put_contents($tmpFile, $data); |
65 | 65 | // use strlen and not mb_strlen. if there is utf8 in the code, it also writes more bytes. |
66 | 66 | if ($bytesWritten !== strlen($data)) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function clear(): bool |
109 | 109 | { |
110 | 110 | $result = true; |
111 | - $files = glob($this->dir . '/*.cache.php'); |
|
111 | + $files = glob($this->dir.'/*.cache.php'); |
|
112 | 112 | foreach ($files as $file) { |
113 | 113 | if (is_file($file)) { |
114 | 114 | $result = $result && @unlink($file); |
@@ -128,6 +128,6 @@ discard block |
||
128 | 128 | { |
129 | 129 | $fileName = str_replace(['\\', "\0", '@', '/', '$', '{', '}', ':'], '-', $key); |
130 | 130 | |
131 | - return $this->dir . '/' . $fileName . '.cache.php'; |
|
131 | + return $this->dir.'/'.$fileName.'.cache.php'; |
|
132 | 132 | } |
133 | 133 | } |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | |
33 | 33 | public function load(string $class): ?ClassMetadata |
34 | 34 | { |
35 | - $this->lastItem = $this->pool->getItem($this->sanitizeCacheKey($this->prefix . $class)); |
|
35 | + $this->lastItem = $this->pool->getItem($this->sanitizeCacheKey($this->prefix.$class)); |
|
36 | 36 | |
37 | 37 | return $this->lastItem->get(); |
38 | 38 | } |
39 | 39 | |
40 | 40 | public function put(ClassMetadata $metadata): void |
41 | 41 | { |
42 | - $key = $this->sanitizeCacheKey($this->prefix . $metadata->name); |
|
42 | + $key = $this->sanitizeCacheKey($this->prefix.$metadata->name); |
|
43 | 43 | |
44 | 44 | if (null === $this->lastItem || $this->lastItem->getKey() !== $key) { |
45 | 45 | $this->lastItem = $this->pool->getItem($key); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function evict(string $class): void |
52 | 52 | { |
53 | - $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix . $class)); |
|
53 | + $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix.$class)); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function clear(): bool |