Completed
Push — V6 ( ed370f...34d680 )
by Georges
02:11
created
src/phpFastCache/Drivers/Cookie/Driver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $keyword = self::PREFIX . $item->getKey();
81 81
             $v = json_encode($this->driverPreWrap($item));
82 82
 
83
-            if (isset($this->config[ 'limited_memory_each_object' ]) && strlen($v) > $this->config[ 'limited_memory_each_object' ]) {
83
+            if (isset($this->config['limited_memory_each_object']) && strlen($v) > $this->config['limited_memory_each_object']) {
84 84
                 return false;
85 85
             }
86 86
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         // return null if no caching
102 102
         // return value if in caching
103 103
         $keyword = self::PREFIX . $item->getKey();
104
-        $x = isset($_COOKIE[ $keyword ]) ? json_decode($_COOKIE[ $keyword ], true) : false;
104
+        $x = isset($_COOKIE[$keyword]) ? json_decode($_COOKIE[$keyword], true) : false;
105 105
 
106 106
         if ($x == false) {
107 107
             return null;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $this->driverConnect();
124 124
         $keyword = self::PREFIX . $key;
125
-        $x = isset($_COOKIE[ $keyword ]) ? $this->decode(json_decode($_COOKIE[ $keyword ])->t) : false;
125
+        $x = isset($_COOKIE[$keyword]) ? $this->decode(json_decode($_COOKIE[$keyword])->t) : false;
126 126
 
127 127
         return $x ? $x - time() : $x;
128 128
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         if ($item instanceof Item) {
141 141
             $this->driverConnect();
142 142
             $keyword = self::PREFIX . $item->getKey();
143
-            $_COOKIE[ $keyword ] = null;
143
+            $_COOKIE[$keyword] = null;
144 144
 
145 145
             return @setcookie($keyword, null, -10);
146 146
         } else {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $this->driverConnect();
158 158
         foreach ($_COOKIE as $keyword => $value) {
159 159
             if (strpos($keyword, self::PREFIX) !== false) {
160
-                $_COOKIE[ $keyword ] = null;
160
+                $_COOKIE[$keyword] = null;
161 161
                 $result = @setcookie($keyword, null, -10);
162 162
                 if ($return !== false) {
163 163
                     $return = $result;
Please login to merge, or discard this patch.