Completed
Push — V6 ( bd4c71...8eea0b )
by Georges
02:23
created
src/phpFastCache/Drivers/Predis/Driver.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
         $config = isset($this->config[ 'redis' ]) ? $this->config[ 'redis' ] : [];
126 126
 
127 127
         $this->instance = new PredisClient(array_merge([
128
-          'host' => '127.0.0.1',
129
-          'port' => '6379',
130
-          'password' => '',
131
-          'database' => '',
128
+            'host' => '127.0.0.1',
129
+            'port' => '6379',
130
+            'password' => '',
131
+            'database' => '',
132 132
         ], $config));
133 133
 
134 134
         return true;
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
         $date = (isset($info['Server'][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info['Server'][ 'uptime_in_seconds' ]) : 'unknown date');
152 152
 
153 153
         return (new driverStatistic())
154
-          ->setData(implode(', ', array_keys($this->itemInstances)))
155
-          ->setRawData($this->instance->info())
156
-          ->setSize($size)
157
-          ->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)));
154
+            ->setData(implode(', ', array_keys($this->itemInstances)))
155
+            ->setRawData($this->instance->info())
156
+            ->setSize($size)
157
+            ->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)));
158 158
     }
159 159
 }
160 160
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function driverConnect()
124 124
     {
125
-        $config = isset($this->config[ 'redis' ]) ? $this->config[ 'redis' ] : [];
125
+        $config = isset($this->config['redis']) ? $this->config['redis'] : [];
126 126
 
127 127
         $this->instance = new PredisClient(array_merge([
128 128
           'host' => '127.0.0.1',
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $info = $this->instance->info();
149 149
         $size = (isset($info['Memory']['used_memory']) ? $info['Memory']['used_memory'] : 0);
150 150
         $version = (isset($info['Server']['redis_version']) ? $info['Server']['redis_version'] : 0);
151
-        $date = (isset($info['Server'][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info['Server'][ 'uptime_in_seconds' ]) : 'unknown date');
151
+        $date = (isset($info['Server']['uptime_in_seconds']) ? (new \DateTime())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
152 152
 
153 153
         return (new driverStatistic())
154 154
           ->setData(implode(', ', array_keys($this->itemInstances)))
Please login to merge, or discard this patch.