Completed
Push — master ( 5c2230...21b2df )
by Oscar
20:30
created
src/Middleware/Csrf.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
             return $next($request, $response);
71 71
         }
72 72
 
73
-        $tokens =& self::getStorage($request, self::KEY);
73
+        $tokens = & self::getStorage($request, self::KEY);
74 74
 
75 75
         if (Utils\Helpers::isPost($request) && !$this->validateRequest($request, $tokens)) {
76 76
             return $response->withStatus(403);
77 77
         }
78 78
 
79
-        $generator = function ($action = null) use ($request, &$tokens) {
79
+        $generator = function($action = null) use ($request, &$tokens) {
80 80
             if (empty($action)) {
81 81
                 $action = $request->getUri()->getPath();
82 82
             }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
         $response = $next($request, $response);
93 93
 
94
-        return $this->insertIntoPostForms($response, function ($match) use ($generator) {
94
+        return $this->insertIntoPostForms($response, function($match) use ($generator) {
95 95
             preg_match('/action=["\']?([^"\'\s]+)["\']?/i', $match[0], $matches);
96 96
 
97 97
             return $match[0].$generator(isset($matches[1]) ? $matches[1] : null);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             return;
177 177
         }
178 178
 
179
-        uasort($tokens, function ($a, $b) {
179
+        uasort($tokens, function($a, $b) {
180 180
             return $a['created'] - $b['created'];
181 181
         });
182 182
 
Please login to merge, or discard this patch.