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