@@ -35,7 +35,7 @@ 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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function put(ClassMetadata $metadata): void |
| 47 | 47 | { |
| 48 | - $key = $this->sanitizeCacheKey($this->prefix . $metadata->name); |
|
| 48 | + $key = $this->sanitizeCacheKey($this->prefix.$metadata->name); |
|
| 49 | 49 | |
| 50 | 50 | if (null === $this->lastItem || $this->lastItem->getKey() !== $key) { |
| 51 | 51 | $this->lastItem = $this->pool->getItem($key); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function evict(string $class): void |
| 61 | 61 | { |
| 62 | - $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix . $class)); |
|
| 62 | + $this->pool->deleteItem($this->sanitizeCacheKey($this->prefix.$class)); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function load(string $class): ?ClassMetadata |
| 29 | 29 | { |
| 30 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($class) . '.cache.php'; |
|
| 30 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($class).'.cache.php'; |
|
| 31 | 31 | if (!file_exists($path)) { |
| 32 | 32 | return null; |
| 33 | 33 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable.', $this->dir)); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($metadata->name) . '.cache.php'; |
|
| 57 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($metadata->name).'.cache.php'; |
|
| 58 | 58 | |
| 59 | 59 | $tmpFile = tempnam($this->dir, 'metadata-cache'); |
| 60 | 60 | if (false === $tmpFile) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | return; |
| 64 | 64 | } |
| 65 | - $data = '<?php return unserialize(' . var_export(serialize($metadata), true) . ');'; |
|
| 65 | + $data = '<?php return unserialize('.var_export(serialize($metadata), true).');'; |
|
| 66 | 66 | $bytesWritten = file_put_contents($tmpFile, $data); |
| 67 | 67 | // use strlen and not mb_strlen. if there is utf8 in the code, it also writes more bytes. |
| 68 | 68 | if ($bytesWritten !== strlen($data)) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function evict(string $class): void |
| 105 | 105 | { |
| 106 | - $path = $this->dir . '/' . $this->sanitizeCacheKey($class) . '.cache.php'; |
|
| 106 | + $path = $this->dir.'/'.$this->sanitizeCacheKey($class).'.cache.php'; |
|
| 107 | 107 | if (file_exists($path)) { |
| 108 | 108 | @unlink($path); |
| 109 | 109 | } |