@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | ); |
129 | 129 | $results = $this->instance->execute(new Cassandra\SimpleStatement($query), $options); |
130 | 130 | |
131 | - if($results instanceof Cassandra\Rows && $results->count() === 1){ |
|
131 | + if ($results instanceof Cassandra\Rows && $results->count() === 1) { |
|
132 | 132 | return $this->decode($results->first()['cache_data']); |
133 | - }else{ |
|
133 | + } else { |
|
134 | 134 | return null; |
135 | 135 | } |
136 | 136 | } catch (Cassandra\Exception $e) { |
@@ -204,20 +204,20 @@ discard block |
||
204 | 204 | if ($this->instance instanceof CouchbaseClient) { |
205 | 205 | throw new \LogicException('Already connected to Couchbase server'); |
206 | 206 | } else { |
207 | - $host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1'; |
|
208 | - $port = isset($this->config[ 'port' ]) ? $this->config[ 'port' ] : 9042; |
|
209 | - $timeout = isset($this->config[ 'timeout' ]) ? $this->config[ 'timeout' ] : 2; |
|
210 | - $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : ''; |
|
211 | - $username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : ''; |
|
207 | + $host = isset($this->config['host']) ? $this->config['host'] : '127.0.0.1'; |
|
208 | + $port = isset($this->config['port']) ? $this->config['port'] : 9042; |
|
209 | + $timeout = isset($this->config['timeout']) ? $this->config['timeout'] : 2; |
|
210 | + $password = isset($this->config['password']) ? $this->config['password'] : ''; |
|
211 | + $username = isset($this->config['username']) ? $this->config['username'] : ''; |
|
212 | 212 | |
213 | 213 | $clusterBuilder = Cassandra::cluster() |
214 | 214 | ->withContactPoints($host) |
215 | 215 | ->withPort($port); |
216 | 216 | |
217 | - if(!empty($this->config['ssl']['enabled'])){ |
|
218 | - if(!empty($this->config['ssl']['verify'])){ |
|
217 | + if (!empty($this->config['ssl']['enabled'])) { |
|
218 | + if (!empty($this->config['ssl']['verify'])) { |
|
219 | 219 | $sslBuilder = Cassandra::ssl()->withVerifyFlags(Cassandra::VERIFY_PEER_CERT); |
220 | - }else{ |
|
220 | + } else { |
|
221 | 221 | $sslBuilder = Cassandra::ssl()->withVerifyFlags(Cassandra::VERIFY_NONE); |
222 | 222 | } |
223 | 223 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | $clusterBuilder->withConnectTimeout($timeout); |
228 | 228 | |
229 | - if($username){ |
|
229 | + if ($username) { |
|
230 | 230 | $clusterBuilder->withCredentials($username, $password); |
231 | 231 | } |
232 | 232 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | ))); |
279 | 279 | |
280 | 280 | return (new driverStatistic()) |
281 | - ->setSize($result->first()[ 'cache_size' ]) |
|
281 | + ->setSize($result->first()['cache_size']) |
|
282 | 282 | ->setRawData([]) |
283 | 283 | ->setData(implode(', ', array_keys($this->itemInstances))) |
284 | 284 | ->setInfo('The cache size represents only the cache data itself without counting data structures associated to the cache entries.'); |