Passed
Push — v7 ( 61f560...7e6987 )
by Georges
01:59
created
lib/Phpfastcache/Helper/ActOnAll.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Helper;
17 17
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function __construct()
39 39
     {
40
-        $this->instances =& CacheManager::getInternalInstances();
40
+        $this->instances = & CacheManager::getInternalInstances();
41 41
     }
42 42
 
43 43
     /**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function getGenericCallback(): \Closure
47 47
     {
48
-        return function ($method, $args) {
48
+        return function($method, $args) {
49 49
             $return = [];
50 50
             foreach ($this->instances as $instance) {
51 51
                 $reflectionMethod = new \ReflectionMethod(\get_class($instance), $method);
52
-                $return[ $instance->getDriverName() ] = $reflectionMethod->invokeArgs($instance, $args);
52
+                $return[$instance->getDriverName()] = $reflectionMethod->invokeArgs($instance, $args);
53 53
             }
54 54
             return $return;
55 55
         };
Please login to merge, or discard this patch.
lib/Phpfastcache/Autoload/Autoload.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Phpfastcache\Autoload;
4 4
 
5 5
 /**
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  *
16 16
  */
17 17
 
18
-class Autoload{}
18
+class Autoload {}
19 19
 
20 20
 \define('PFC_PHP_EXT', 'php');
21 21
 \define('PFC_BIN_DIR', __DIR__ . '/../../../bin/');
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 /**
25 25
  * Register Autoload
26 26
  */
27
-spl_autoload_register(function ($entity) {
27
+spl_autoload_register(function($entity) {
28 28
     $module = \explode('\\', $entity, 2);
29
-    if (!\in_array($module[ 0 ], ['Phpfastcache', 'Psr'])) {
29
+    if (!\in_array($module[0], ['Phpfastcache', 'Psr'])) {
30 30
         /**
31 31
          * Not a part of phpFastCache file
32 32
          * then we return here.
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,5 +66,5 @@
 block discarded – undo
66 66
 
67 67
 if ((!\defined('PFC_IGNORE_COMPOSER_WARNING') || !PFC_IGNORE_COMPOSER_WARNING) && \class_exists(\Composer\Autoload\ClassLoader::class)) {
68 68
     \trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
69
-      E_USER_WARNING);
69
+        E_USER_WARNING);
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/ItemBaseTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Core\Item;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Core\Pool;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 use Phpfastcache\Entities\DriverStatistic;
22 22
 use Phpfastcache\EventManager;
23 23
 use Phpfastcache\Exceptions\{
24
-  PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException
24
+    PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException
25 25
 };
26 26
 use Phpfastcache\Util\ArrayObject;
27 27
 use Psr\Cache\{CacheItemInterface, CacheItemPoolInterface};
Please login to merge, or discard this patch.
lib/Phpfastcache/Util/Directory.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
 
84 84
         $files = new RecursiveIteratorIterator
85 85
         (
86
-          new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
87
-          RecursiveIteratorIterator::CHILD_FIRST
86
+            new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
87
+            RecursiveIteratorIterator::CHILD_FIRST
88 88
         );
89 89
         
90 90
         foreach ($files as $fileinfo) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Util;
17 17
 
@@ -87,8 +87,7 @@  discard block
 block discarded – undo
87 87
             return \unlink($source);
88 88
         }
89 89
 
90
-        $files = new RecursiveIteratorIterator
91
-        (
90
+        $files = new RecursiveIteratorIterator(
92 91
           new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
93 92
           RecursiveIteratorIterator::CHILD_FIRST
94 93
         );
@@ -138,8 +137,8 @@  discard block
 block discarded – undo
138 137
         /**
139 138
          * Allows to dereference char
140 139
          */
141
-        $__FILE__ = \preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc.
142
-        $prefix = $__FILE__[ 0 ] === \DIRECTORY_SEPARATOR ? \DIRECTORY_SEPARATOR : '';
140
+        $__FILE__ = \preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__); // remove file protocols such as "phar://" etc.
141
+        $prefix = $__FILE__[0] === \DIRECTORY_SEPARATOR ? \DIRECTORY_SEPARATOR : '';
143 142
         return $prefix . \implode(\DIRECTORY_SEPARATOR, $absolutes);
144 143
     }
145 144
 }
146 145
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Util/ArrayObject.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * Date: 01/10/2017
6 6
  * Time: 00:08
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Phpfastcache\Util;
11 11
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function __construct(...$args)
34 34
     {
35
-        $this->array = (\count($args) === 1 && \is_array($args[ 0 ]) ? $args[ 0 ] : $args);
35
+        $this->array = (\count($args) === 1 && \is_array($args[0]) ? $args[0] : $args);
36 36
     }
37 37
 
38 38
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function current()
42 42
     {
43
-        return $this->array[ $this->position ];
43
+        return $this->array[$this->position];
44 44
     }
45 45
 
46 46
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function offsetGet($offset)
100 100
     {
101
-        return $this->array[ $offset ] ?? null;
101
+        return $this->array[$offset] ?? null;
102 102
     }
103 103
 
104 104
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         if ($offset === null) {
114 114
             $this->array[] = $value;
115 115
         } else {
116
-            $this->array[ $offset ] = $value;
116
+            $this->array[$offset] = $value;
117 117
         }
118 118
     }
119 119
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function offsetUnset($offset)
124 124
     {
125
-        unset($this->array[ $offset ]);
125
+        unset($this->array[$offset]);
126 126
     }
127 127
 
128 128
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Devtrue/Driver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Devtrue;
17 17
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
19 19
 use Phpfastcache\Entities\DriverStatistic;
20 20
 use Phpfastcache\Exceptions\{
21
-  PhpfastcacheInvalidArgumentException
21
+    PhpfastcacheInvalidArgumentException
22 22
 };
23 23
 use Psr\Cache\CacheItemInterface;
24 24
 
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     protected function driverRead(CacheItemInterface $item): array
65 65
     {
66 66
         return [
67
-          self::DRIVER_DATA_WRAPPER_INDEX => true,
68
-          self::DRIVER_TAGS_WRAPPER_INDEX => [],
69
-          self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
67
+            self::DRIVER_DATA_WRAPPER_INDEX => true,
68
+            self::DRIVER_TAGS_WRAPPER_INDEX => [],
69
+            self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
70 70
         ];
71 71
     }
72 72
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $stat = new DriverStatistic();
118 118
         $stat->setInfo('[Devtrue] A void info string')
119
-          ->setSize(0)
120
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
121
-          ->setRawData(true);
119
+            ->setSize(0)
120
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
121
+            ->setRawData(true);
122 122
 
123 123
         return $stat;
124 124
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Devfalse/Driver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Devfalse;
17 17
 
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 namespace Phpfastcache\Drivers\Devfalse;
17 17
 
18 18
 use Phpfastcache\Core\Pool\{
19
-  DriverBaseTrait, ExtendedCacheItemPoolInterface
19
+    DriverBaseTrait, ExtendedCacheItemPoolInterface
20 20
 };
21 21
 use Phpfastcache\Entities\DriverStatistic;
22 22
 use Phpfastcache\Exceptions\{
23
-  PhpfastcacheInvalidArgumentException
23
+    PhpfastcacheInvalidArgumentException
24 24
 };
25 25
 use Psr\Cache\CacheItemInterface;
26 26
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     protected function driverRead(CacheItemInterface $item): array
67 67
     {
68 68
         return [
69
-          self::DRIVER_DATA_WRAPPER_INDEX => false,
70
-          self::DRIVER_TAGS_WRAPPER_INDEX => [],
71
-          self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
69
+            self::DRIVER_DATA_WRAPPER_INDEX => false,
70
+            self::DRIVER_TAGS_WRAPPER_INDEX => [],
71
+            self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
72 72
         ];
73 73
     }
74 74
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $stat = new DriverStatistic();
120 120
         $stat->setInfo('[Devfalse] A void info string')
121
-          ->setSize(0)
122
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
123
-          ->setRawData(false);
121
+            ->setSize(0)
122
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
123
+            ->setRawData(false);
124 124
 
125 125
         return $stat;
126 126
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcached/Config.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
      * @var array
17 17
      */
18 18
     protected $servers = [
19
-      [
19
+        [
20 20
         'host' => '127.0.0.1',
21 21
         'port' => 11211,
22 22
         'saslUser' => false,
23 23
         'saslPassword' => false,
24
-      ],
24
+        ],
25 25
     ];
26 26
 
27 27
     /**
Please login to merge, or discard this patch.