@@ -31,18 +31,18 @@ |
||
31 | 31 | |
32 | 32 | public function load(string $class): ?ClassMetadata |
33 | 33 | { |
34 | - $cache = $this->cache->fetch($this->prefix . $class); |
|
34 | + $cache = $this->cache->fetch($this->prefix.$class); |
|
35 | 35 | |
36 | 36 | return false === $cache ? null : $cache; |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function put(ClassMetadata $metadata): void |
40 | 40 | { |
41 | - $this->cache->save($this->prefix . $metadata->name, $metadata); |
|
41 | + $this->cache->save($this->prefix.$metadata->name, $metadata); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | public function evict(string $class): void |
45 | 45 | { |
46 | - $this->cache->delete($this->prefix . $class); |
|
46 | + $this->cache->delete($this->prefix.$class); |
|
47 | 47 | } |
48 | 48 | } |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | |
36 | 36 | public function load(string $class): ?ClassMetadata |
37 | 37 | { |
38 | - $this->lastItem = $this->pool->getItem($this->sanitizeCacheKey($this->prefix . $class)); |
|
38 | + $this->lastItem = $this->pool->getItem($this->sanitizeCacheKey($this->prefix.$class)); |
|
39 | 39 | |
40 | 40 | return $this->lastItem->get(); |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function put(ClassMetadata $metadata): void |
44 | 44 | { |
45 | - $key = $this->sanitizeCacheKey($this->prefix . $metadata->name); |
|
45 | + $key = $this->sanitizeCacheKey($this->prefix.$metadata->name); |
|
46 | 46 | |
47 | 47 | if (null === $this->lastItem || $this->lastItem->getKey() !== $key) { |
48 | 48 | $this->lastItem = $this->pool->getItem($key); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function evict(string $class): void |
55 | 55 | { |
56 | - $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix . $class)); |
|
56 | + $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix.$class)); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function load(string $class): ?ClassMetadata |
27 | 27 | { |
28 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($class) . '.cache.php'; |
|
28 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($class).'.cache.php'; |
|
29 | 29 | if (!file_exists($path)) { |
30 | 30 | return null; |
31 | 31 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable.', $this->dir)); |
51 | 51 | } |
52 | 52 | |
53 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($metadata->name) . '.cache.php'; |
|
53 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($metadata->name).'.cache.php'; |
|
54 | 54 | |
55 | 55 | $tmpFile = tempnam($this->dir, 'metadata-cache'); |
56 | 56 | if (false === $tmpFile) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return; |
60 | 60 | } |
61 | 61 | |
62 | - $data = '<?php return unserialize(' . var_export(serialize($metadata), true) . ');'; |
|
62 | + $data = '<?php return unserialize('.var_export(serialize($metadata), true).');'; |
|
63 | 63 | $bytesWritten = file_put_contents($tmpFile, $data); |
64 | 64 | // use strlen and not mb_strlen. if there is utf8 in the code, it also writes more bytes. |
65 | 65 | if ($bytesWritten !== strlen($data)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | public function evict(string $class): void |
99 | 99 | { |
100 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($class) . '.cache.php'; |
|
100 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($class).'.cache.php'; |
|
101 | 101 | if (file_exists($path)) { |
102 | 102 | @unlink($path); |
103 | 103 | } |