@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function doFetch($id) |
67 | 67 | { |
68 | - if (! $this->doContains($id)) { |
|
68 | + if ( ! $this->doContains($id)) { |
|
69 | 69 | $this->missesCount += 1; |
70 | 70 | |
71 | 71 | return false; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | protected function doContains($id) |
83 | 83 | { |
84 | - if (! isset($this->data[$id])) { |
|
84 | + if ( ! isset($this->data[$id])) { |
|
85 | 85 | return false; |
86 | 86 | } |
87 | 87 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | // No lifetime, use MSET |
73 | - $response = $this->client->mset(array_map(function ($value) { |
|
73 | + $response = $this->client->mset(array_map(function($value) { |
|
74 | 74 | return serialize($value); |
75 | 75 | }, $keysAndValues)); |
76 | 76 |
@@ -142,7 +142,7 @@ |
||
142 | 142 | { |
143 | 143 | $stats = $this->memcached->getStats(); |
144 | 144 | $servers = $this->memcached->getServerList(); |
145 | - $key = $servers[0]['host'] . ':' . $servers[0]['port']; |
|
145 | + $key = $servers[0]['host'].':'.$servers[0]['port']; |
|
146 | 146 | $stats = $stats[$key]; |
147 | 147 | return [ |
148 | 148 | Cache::STATS_HITS => $stats['get_hits'], |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Common\Cache; |
6 | 6 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $item = $this->findById($id); |
80 | 80 | |
81 | - if (! $item) { |
|
81 | + if ( ! $item) { |
|
82 | 82 | return false; |
83 | 83 | } |
84 | 84 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | list($idField) = $fields = $this->getFields(); |
158 | 158 | |
159 | - if (! $includeData) { |
|
159 | + if ( ! $includeData) { |
|
160 | 160 | $key = array_search(static::DATA_FIELD, $fields); |
161 | 161 | unset($fields[$key]); |
162 | 162 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | parent::__construct($directory, $extension, $umask); |
35 | 35 | |
36 | - self::$emptyErrorHandler = function () { |
|
36 | + self::$emptyErrorHandler = function() { |
|
37 | 37 | }; |
38 | 38 | } |
39 | 39 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | restore_error_handler(); |
113 | 113 | |
114 | - if (! isset($value['lifetime'])) { |
|
114 | + if ( ! isset($value['lifetime'])) { |
|
115 | 115 | return null; |
116 | 116 | } |
117 | 117 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | |
6 | 6 | namespace Doctrine\Common\Cache; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ['_id' => $id], |
101 | 101 | [ |
102 | 102 | '$set' => [ |
103 | - MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new UTCDateTime((time() + $lifeTime) * 1000): null), |
|
103 | + MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new UTCDateTime((time() + $lifeTime) * 1000) : null), |
|
104 | 104 | MongoDBCache::DATA_FIELD => new Binary(serialize($data), Binary::TYPE_GENERIC), |
105 | 105 | ], |
106 | 106 | ], |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | 'recordStats' => 0, |
159 | 159 | 'repl' => 0, |
160 | 160 | ])->toArray()[0]; |
161 | - $uptime = $serverStatus['uptime'] ?? null; |
|
161 | + $uptime = $serverStatus['uptime'] ?? null; |
|
162 | 162 | } catch (Exception $e) { |
163 | 163 | } |
164 | 164 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $lifetime = -1; |
37 | 37 | $filename = $this->getFilename($id); |
38 | 38 | |
39 | - if (! is_file($filename)) { |
|
39 | + if ( ! is_file($filename)) { |
|
40 | 40 | return false; |
41 | 41 | } |
42 | 42 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $lifetime = -1; |
71 | 71 | $filename = $this->getFilename($id); |
72 | 72 | |
73 | - if (! is_file($filename)) { |
|
73 | + if ( ! is_file($filename)) { |
|
74 | 74 | return false; |
75 | 75 | } |
76 | 76 | |
@@ -98,6 +98,6 @@ discard block |
||
98 | 98 | $data = serialize($data); |
99 | 99 | $filename = $this->getFilename($id); |
100 | 100 | |
101 | - return $this->writeFile($filename, $lifeTime . PHP_EOL . $data); |
|
101 | + return $this->writeFile($filename, $lifeTime.PHP_EOL.$data); |
|
102 | 102 | } |
103 | 103 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $response = $this->bucket->get($id); |
42 | 42 | |
43 | 43 | // No objects found |
44 | - if (! $response->hasObject()) { |
|
44 | + if ( ! $response->hasObject()) { |
|
45 | 45 | return false; |
46 | 46 | } |
47 | 47 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $response = $this->bucket->get($id, $input); |
84 | 84 | |
85 | 85 | // No objects found |
86 | - if (! $response->hasObject()) { |
|
86 | + if ( ! $response->hasObject()) { |
|
87 | 87 | return false; |
88 | 88 | } |
89 | 89 |