Completed
Push — v5 ( 3408cd...5866c7 )
by Georges
02:36
created
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/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.
src/phpFastCache/Util/Directory.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
             /**
30 30
              * @var \SplFileInfo $file
31 31
              */
32
-            if($file->isFile())
32
+            if ($file->isFile())
33 33
             {
34 34
                 $size += filesize($file->getRealPath());
35 35
             }
36
-            else if($includeDirAllocSize)
36
+            else if ($includeDirAllocSize)
37 37
             {
38 38
                 $size += $file->getSize();
39 39
             }
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $count = 0;
52 52
         $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST);
53
-        foreach($objects as $object){
53
+        foreach ($objects as $object) {
54 54
             /**
55 55
              * @var \SplFileInfo $object
56 56
              */
57
-            if($object->isFile())
57
+            if ($object->isFile())
58 58
             {
59 59
                 $count++;
60 60
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
             if($file->isFile())
33 33
             {
34 34
                 $size += filesize($file->getRealPath());
35
-            }
36
-            else if($includeDirAllocSize)
35
+            } else if($includeDirAllocSize)
37 36
             {
38 37
                 $size += $file->getSize();
39 38
             }
Please login to merge, or discard this patch.
src/phpFastCache/Cache/ItemBaseTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     public function removeTag($tagName)
350 350
     {
351 351
         if (($key = array_search($tagName, $this->tags)) !== false) {
352
-            unset($this->tags[ $key ]);
352
+            unset($this->tags[$key]);
353 353
             $this->removedTags[] = $tagName;
354 354
         }
355 355
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     final public function __sleep()
384 384
     {
385 385
         $info = get_object_vars($this);
386
-        $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')';
386
+        $info['driver'] = 'object(' . get_class($info['driver']) . ')';
387 387
 
388 388
         return (array) $info;
389 389
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
     final public function __debugInfo()
396 396
     {
397 397
         $info = get_object_vars($this);
398
-        $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')';
398
+        $info['driver'] = 'object(' . get_class($info['driver']) . ')';
399 399
 
400 400
         return (array) $info;
401 401
     }
Please login to merge, or discard this patch.