Completed
Push — v5 ( 307e18...c22ae7 )
by Georges
02:38
created
src/phpFastCache/Drivers/Ssdb/Driver.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,10 +147,10 @@
 block discarded – undo
147 147
     {
148 148
         try{
149 149
             $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
150
-              'host' => "127.0.0.1",
151
-              'port' => 8888,
152
-              'password' => '',
153
-              'timeout' => 2000,
150
+                'host' => "127.0.0.1",
151
+                'port' => 8888,
152
+                'password' => '',
153
+                'timeout' => 2000,
154 154
             ];
155 155
 
156 156
             $host = $server[ 'host' ];
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function driverConnect()
147 147
     {
148
-        try{
149
-            $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
148
+        try {
149
+            $server = isset($this->config['ssdb']) ? $this->config['ssdb'] : [
150 150
               'host' => "127.0.0.1",
151 151
               'port' => 8888,
152 152
               'password' => '',
153 153
               'timeout' => 2000,
154 154
             ];
155 155
 
156
-            $host = $server[ 'host' ];
157
-            $port = isset($server[ 'port' ]) ? (int) $server[ 'port' ] : 8888;
158
-            $password = isset($server[ 'password' ]) ? $server[ 'password' ] : '';
159
-            $timeout = !empty($server[ 'timeout' ]) ? (int) $server[ 'timeout' ] : 2000;
156
+            $host = $server['host'];
157
+            $port = isset($server['port']) ? (int) $server['port'] : 8888;
158
+            $password = isset($server['password']) ? $server['password'] : '';
159
+            $timeout = !empty($server['timeout']) ? (int) $server['timeout'] : 2000;
160 160
             $this->instance = new SimpleSSDB($host, $port, $timeout);
161 161
             if (!empty($password)) {
162 162
                 $this->instance->auth($password);
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
             } else {
168 168
                 return true;
169 169
             }
170
-        }catch(SSDBException $e){
171
-            throw new phpFastCacheDriverException('Ssdb failed to connect with error: '. $e->getMessage(), 0 , $e);
170
+        } catch (SSDBException $e) {
171
+            throw new phpFastCacheDriverException('Ssdb failed to connect with error: ' . $e->getMessage(), 0, $e);
172 172
         }
173 173
     }
174 174
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
             } else {
168 168
                 return true;
169 169
             }
170
-        }catch(SSDBException $e){
170
+        } catch(SSDBException $e){
171 171
             throw new phpFastCacheDriverException('Ssdb failed to connect with error: '. $e->getMessage(), 0 , $e);
172 172
         }
173 173
     }
Please login to merge, or discard this patch.
src/phpFastCache/Cache/DriverBaseTrait.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
 
117 117
     /**
118
-     * @param $file
118
+     * @param string $file
119 119
      * @return string
120 120
      * @throws \Exception
121 121
      */
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,9 +214,9 @@
 block discarded – undo
214 214
     public function driverPreWrap(ExtendedCacheItemInterface $item)
215 215
     {
216 216
         return [
217
-          self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
218
-          self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(),
219
-          self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
217
+            self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
218
+            self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(),
219
+            self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
220 220
         ];
221 221
     }
222 222
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         if (is_array($config_name)) {
66 66
             $this->config = array_merge($this->config, $config_name);
67 67
         } else {
68
-            $this->config[ $config_name ] = $value;
68
+            $this->config[$config_name] = $value;
69 69
         }
70 70
     }
71 71
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function driverUnwrapData(array $wrapper)
184 184
     {
185
-        return $wrapper[ self::DRIVER_DATA_WRAPPER_INDEX ];
185
+        return $wrapper[self::DRIVER_DATA_WRAPPER_INDEX];
186 186
     }
187 187
 
188 188
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function driverUnwrapTags(array $wrapper)
193 193
     {
194
-        return $wrapper[ self::DRIVER_TAGS_WRAPPER_INDEX ];
194
+        return $wrapper[self::DRIVER_TAGS_WRAPPER_INDEX];
195 195
     }
196 196
 
197 197
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function driverUnwrapTime(array $wrapper)
203 203
     {
204
-        return $wrapper[ self::DRIVER_TIME_WRAPPER_INDEX ];
204
+        return $wrapper[self::DRIVER_TIME_WRAPPER_INDEX];
205 205
     }
206 206
 
207 207
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         foreach ($tagsItems as $tagsItem) {
256 256
             $data = (array) $tagsItem->get();
257 257
 
258
-            unset($data[ $item->getKey() ]);
258
+            unset($data[$item->getKey()]);
259 259
             $tagsItem->set($data);
260 260
 
261 261
             /**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     public static function isValidOption($optionName, $optionValue)
308 308
     {
309
-        if(!is_string($optionName))
309
+        if (!is_string($optionName))
310 310
         {
311 311
             throw new \InvalidArgumentException('$optionName must be a string');
312 312
         }
Please login to merge, or discard this patch.
src/phpFastCache/Util/Directory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
     {
40 40
         $count = 0;
41 41
         $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST);
42
-        foreach($objects as $name => $object){
42
+        foreach ($objects as $name => $object) {
43 43
             /**
44 44
              * @var \SplFileInfo $object
45 45
              */
46
-            if($object->isFile())
46
+            if ($object->isFile())
47 47
             {
48 48
                 $count++;
49 49
             }
Please login to merge, or discard this patch.
src/phpFastCache/Entities/driverStatistic.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     protected $rawData;
45 45
 
46 46
     /**
47
-     * @return string|bool Return infos or false if no information available
47
+     * @return string Return infos or false if no information available
48 48
      */
49 49
     public function getInfo()
50 50
     {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @return int|bool Return size in octet or false if no information available
55
+     * @return string Return size in octet or false if no information available
56 56
      */
57 57
     public function getSize()
58 58
     {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     }
61 61
 
62 62
     /**
63
-     * @return mixed
63
+     * @return string
64 64
      */
65 65
     public function getData()
66 66
     {
Please login to merge, or discard this patch.