Completed
Push — master ( 345022...5c5fe2 )
by Oscar
03:17
created
src/Middleware/Csrf.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      * @param ServerRequestInterface $request
115 115
      * @param string                 $lockTo
116 116
      *
117
-     * @return array
117
+     * @return string
118 118
      */
119 119
     private function generateTokens(ServerRequestInterface $request, $lockTo)
120 120
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
         $token = self::encode(hash_hmac('sha256', ClientIp::getIp($request), base64_decode($token), true));
134 134
 
135 135
         return '<input type="hidden" name="'.$this->formIndex.'" value="'.htmlentities($index, ENT_QUOTES, 'UTF-8').'">'
136
-               .'<input type="hidden" name="'.$this->formToken.'" value="'.htmlentities($token, ENT_QUOTES, 'UTF-8').'">';
136
+                .'<input type="hidden" name="'.$this->formToken.'" value="'.htmlentities($token, ENT_QUOTES, 'UTF-8').'">';
137 137
     }
138 138
 
139 139
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         $response = $next($request, $response);
101 101
 
102
-        return $this->insertIntoPostForms($response, function ($match) use ($request) {
102
+        return $this->insertIntoPostForms($response, function($match) use ($request) {
103 103
             preg_match('/action=["\']?([^"\'\s]+)["\']?/i', $match[0], $matches);
104 104
 
105 105
             $action = empty($matches[1]) ? $request->getUri()->getPath() : $matches[1];
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             return;
183 183
         }
184 184
 
185
-        uasort($this->storage, function ($a, $b) {
185
+        uasort($this->storage, function($a, $b) {
186 186
             return $a['created'] - $b['created'];
187 187
         });
188 188
 
Please login to merge, or discard this patch.