Completed
Push — v7 ( f31319...501a7e )
by Georges
01:50
created
lib/Phpfastcache/Config/ConfigurationOption.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,33 +92,33 @@  discard block
 block discarded – undo
92 92
     public function __construct(...$args)
93 93
     {
94 94
         parent::__construct(...$args);
95
-        $array =& $this->getArray();
95
+        $array = & $this->getArray();
96 96
 
97 97
         /**
98 98
          * Detect unwanted keys and throw an exception.
99 99
          * No more kidding now, it's 21th century.
100 100
          */
101
-        if(array_diff_key($array, get_object_vars($this))){
101
+        if (array_diff_key($array, get_object_vars($this))) {
102 102
             throw new PhpfastcacheInvalidConfigurationException(sprintf(
103 103
               'Invalid option(s) for the config %s: %s',
104 104
               static::class,
105
-              implode(', ',  array_keys(array_diff_key($array, get_object_vars($this))))
105
+              implode(', ', array_keys(array_diff_key($array, get_object_vars($this))))
106 106
             ));
107 107
         }
108 108
 
109 109
         foreach (get_object_vars($this) as $property => $value) {
110 110
 
111
-            if(array_key_exists($property, $array)){
112
-                $this->$property = &$array[ $property ];
113
-            }else{
114
-                $array[ $property ] = &$this->$property;
111
+            if (array_key_exists($property, $array)) {
112
+                $this->$property = &$array[$property];
113
+            } else {
114
+                $array[$property] = &$this->$property;
115 115
             }
116 116
         }
117 117
 
118 118
         foreach (get_class_methods($this) as $method) {
119
-            if(strpos($method, 'set') === 0){
119
+            if (strpos($method, 'set') === 0) {
120 120
                 $value = null;
121
-                try{
121
+                try {
122 122
                     /**
123 123
                      * We use property instead of getter
124 124
                      * because of is/get conditions and
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                      */
128 128
                     $value = $this->{lcfirst(substr($method, 3))};
129 129
                     $this->{$method}($value);
130
-                }catch(\TypeError $e){
130
+                } catch (\TypeError $e) {
131 131
                     $typeHintGot = \is_object($value) ? \get_class($value) : \gettype($value);
132 132
                     $reflectionMethod = new \ReflectionMethod($this, $method);
133 133
                     $parameter = $reflectionMethod->getParameters()[0] ?? null;
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      */
325 325
     public function setFallbackConfig($fallbackConfig): self
326 326
     {
327
-        if($fallbackConfig !== null && !($fallbackConfig instanceof self)){
327
+        if ($fallbackConfig !== null && !($fallbackConfig instanceof self)) {
328 328
             throw new PhpfastcacheInvalidArgumentException(sprintf(
329 329
               'Invalid argument "%s" for %s',
330 330
               gettype($fallbackConfig) === 'object' ? get_class($fallbackConfig) : gettype($fallbackConfig),
Please login to merge, or discard this patch.
lib/Phpfastcache/Helper/TestHelper.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\Helper;
17 17
 
Please login to merge, or discard this patch.