@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | protected function driverConnect() |
126 | 126 | { |
127 | - $config = isset($this->config[ 'predis' ]) ? $this->config[ 'predis' ] : []; |
|
127 | + $config = isset($this->config['predis']) ? $this->config['predis'] : []; |
|
128 | 128 | |
129 | 129 | $this->instance = new PredisClient(array_merge([ |
130 | 130 | 'host' => '127.0.0.1', |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $info = $this->instance->info(); |
151 | 151 | $size = (isset($info['Memory']['used_memory']) ? $info['Memory']['used_memory'] : 0); |
152 | 152 | $version = (isset($info['Server']['redis_version']) ? $info['Server']['redis_version'] : 0); |
153 | - $date = (isset($info['Server'][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info['Server'][ 'uptime_in_seconds' ]) : 'unknown date'); |
|
153 | + $date = (isset($info['Server']['uptime_in_seconds']) ? (new \DateTime())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date'); |
|
154 | 154 | |
155 | 155 | return (new driverStatistic()) |
156 | 156 | ->setData(implode(', ', array_keys($this->itemInstances))) |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | $config = isset($this->config[ 'predis' ]) ? $this->config[ 'predis' ] : []; |
128 | 128 | |
129 | 129 | $this->instance = new PredisClient(array_merge([ |
130 | - 'host' => '127.0.0.1', |
|
131 | - 'port' => 6379, |
|
132 | - 'password' => null, |
|
133 | - 'database' => null, |
|
130 | + 'host' => '127.0.0.1', |
|
131 | + 'port' => 6379, |
|
132 | + 'password' => null, |
|
133 | + 'database' => null, |
|
134 | 134 | ], $config)); |
135 | 135 | |
136 | 136 | return true; |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | $date = (isset($info['Server'][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info['Server'][ 'uptime_in_seconds' ]) : 'unknown date'); |
154 | 154 | |
155 | 155 | return (new driverStatistic()) |
156 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
157 | - ->setRawData($this->instance->info()) |
|
158 | - ->setSize($size) |
|
159 | - ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", $version, $date->format(DATE_RFC2822))); |
|
156 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
157 | + ->setRawData($this->instance->info()) |
|
158 | + ->setSize($size) |
|
159 | + ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", $version, $date->format(DATE_RFC2822))); |
|
160 | 160 | } |
161 | 161 | } |
162 | 162 | \ No newline at end of file |