@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function driverConnect() |
127 | 127 | { |
128 | - $config = isset($this->config[ 'predis' ]) ? $this->config[ 'predis' ] : []; |
|
128 | + $config = isset($this->config['predis']) ? $this->config['predis'] : []; |
|
129 | 129 | |
130 | 130 | $this->instance = new PredisClient(array_merge([ |
131 | 131 | 'host' => '127.0.0.1', |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | 'database' => null, |
135 | 135 | ], $config)); |
136 | 136 | |
137 | - try{ |
|
137 | + try { |
|
138 | 138 | $this->instance->connect(); |
139 | - }catch(PredisConnectionException $e){ |
|
139 | + } catch (PredisConnectionException $e) { |
|
140 | 140 | throw new phpFastCacheDriverException('Failed to connect to predis server', 0, $e); |
141 | 141 | } |
142 | 142 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $info = $this->instance->info(); |
172 | 172 | $size = (isset($info['Memory']['used_memory']) ? $info['Memory']['used_memory'] : 0); |
173 | 173 | $version = (isset($info['Server']['redis_version']) ? $info['Server']['redis_version'] : 0); |
174 | - $date = (isset($info['Server'][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info['Server'][ 'uptime_in_seconds' ]) : 'unknown date'); |
|
174 | + $date = (isset($info['Server']['uptime_in_seconds']) ? (new \DateTime())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date'); |
|
175 | 175 | |
176 | 176 | return (new DriverStatistic()) |
177 | 177 | ->setData(implode(', ', array_keys($this->itemInstances))) |