Passed
Branch b1.1.0 (4918c2)
by Sebastian
02:09
created
src/CsrfGuard.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @copyright (c) 2017, Sebastian Rapetti
8 8
  * @license http://opensource.org/licenses/MIT MIT License
9 9
  */
10
-declare(strict_types=1);
10
+declare(strict_types = 1);
11 11
 
12 12
 namespace Linna;
13 13
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $tokens = &$this->session['CSRF'];
187 187
 
188 188
         return $this->tokenIsValid($tokens, $value, $key) &&
189
-               $this->tokenIsExiperd($tokens, $key)  &&
189
+               $this->tokenIsExiperd($tokens, $key) &&
190 190
                $this->deleteToken($tokens, $key);
191 191
     }
192 192
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      * @param string $key
200 200
      * @return bool
201 201
      */
202
-    private function deleteToken(array &$tokens, string &$key) : bool
202
+    private function deleteToken(array &$tokens, string & $key) : bool
203 203
     {
204 204
         unset($tokens[$key]);
205 205
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      *
218 218
      * @return bool
219 219
      */
220
-    private function tokenIsValid(array &$tokens, string &$value, string &$key) : bool
220
+    private function tokenIsValid(array &$tokens, string & $value, string & $key) : bool
221 221
     {
222 222
         //if token exist
223 223
         if (!isset($tokens[$key])) {
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      *
243 243
      * @return bool
244 244
      */
245
-    private function tokenIsExiperd(array &$tokens, string &$key) : bool
245
+    private function tokenIsExiperd(array &$tokens, string & $key) : bool
246 246
     {
247 247
         //if timed and if time is valid
248 248
         if (isset($tokens[$key]['time']) && $tokens[$key]['time'] < time()) {
Please login to merge, or discard this patch.