@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | $path = isset($config[ 'path' ]) ? (string) $config[ 'path' ] : false; |
| 139 | 139 | |
| 140 | 140 | $defaultConfig = [ |
| 141 | - 'host' => '127.0.0.1', |
|
| 142 | - 'port' => 6379, |
|
| 143 | - 'password' => null, |
|
| 144 | - 'database' => null, |
|
| 141 | + 'host' => '127.0.0.1', |
|
| 142 | + 'port' => 6379, |
|
| 143 | + 'password' => null, |
|
| 144 | + 'database' => null, |
|
| 145 | 145 | ]; |
| 146 | 146 | $config = array_merge($defaultConfig, $config); |
| 147 | 147 | |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | if($path){ |
| 152 | 152 | $this->instance = new PredisClient([ |
| 153 | - 'scheme' => 'unix', |
|
| 154 | - 'path' => $path |
|
| 153 | + 'scheme' => 'unix', |
|
| 154 | + 'path' => $path |
|
| 155 | 155 | ]); |
| 156 | 156 | }else{ |
| 157 | 157 | $this->instance = new PredisClient($config); |
@@ -197,10 +197,10 @@ discard block |
||
| 197 | 197 | $date = (isset($info[ 'Server' ][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info[ 'Server' ][ 'uptime_in_seconds' ]) : 'unknown date'); |
| 198 | 198 | |
| 199 | 199 | return (new DriverStatistic()) |
| 200 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 201 | - ->setRawData($info) |
|
| 202 | - ->setSize($size) |
|
| 203 | - ->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.", |
|
| 200 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 201 | + ->setRawData($info) |
|
| 202 | + ->setSize($size) |
|
| 203 | + ->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.", |
|
| 204 | 204 | $version, $date->format(DATE_RFC2822))); |
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | \ No newline at end of file |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []); |
| 136 | 136 | if (count($servers) < 1) { |
| 137 | 137 | $servers = [ |
| 138 | - [ |
|
| 138 | + [ |
|
| 139 | 139 | 'host' => !empty($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1', |
| 140 | 140 | 'path' => !empty($this->config[ 'path' ]) ? $this->config[ 'path' ] : false, |
| 141 | 141 | 'port' => !empty($this->config[ 'port' ]) ? $this->config[ 'port' ] : 11211, |
| 142 | 142 | 'sasl_user' => !empty($this->config[ 'sasl_user' ]) ? $this->config[ 'sasl_user' ] : false, |
| 143 | 143 | 'sasl_password' =>!empty($this->config[ 'sasl_password' ]) ? $this->config[ 'sasl_password' ]: false, |
| 144 | - ], |
|
| 144 | + ], |
|
| 145 | 145 | ]; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]); |
| 196 | 196 | |
| 197 | 197 | return (new DriverStatistic()) |
| 198 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 199 | - ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
| 200 | - ->setRawData($stats) |
|
| 201 | - ->setSize($stats[ 'bytes' ]); |
|
| 198 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 199 | + ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
| 200 | + ->setRawData($stats) |
|
| 201 | + ->setSize($stats[ 'bytes' ]); |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | \ No newline at end of file |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []); |
| 136 | 136 | if (count($servers) < 1) { |
| 137 | 137 | $servers = [ |
| 138 | - [ |
|
| 138 | + [ |
|
| 139 | 139 | 'host' => !empty($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1', |
| 140 | 140 | 'path' => !empty($this->config[ 'path' ]) ? $this->config[ 'path' ] : false, |
| 141 | 141 | 'port' => !empty($this->config[ 'port' ]) ? $this->config[ 'port' ] : 11211, |
| 142 | 142 | 'sasl_user' => !empty($this->config[ 'sasl_user' ]) ? $this->config[ 'sasl_user' ] : false, |
| 143 | 143 | 'sasl_password' =>!empty($this->config[ 'sasl_password' ]) ? $this->config[ 'sasl_password' ]: false, |
| 144 | - ], |
|
| 144 | + ], |
|
| 145 | 145 | ]; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]); |
| 196 | 196 | |
| 197 | 197 | return (new DriverStatistic()) |
| 198 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 199 | - ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
| 200 | - ->setRawData($stats) |
|
| 201 | - ->setSize($stats[ 'bytes' ]); |
|
| 198 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
| 199 | + ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
| 200 | + ->setRawData($stats) |
|
| 201 | + ->setSize($stats[ 'bytes' ]); |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | \ No newline at end of file |