Completed
Push — master ( 00ed35...63fbb3 )
by Oscar
10:20
created
src/Middleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      */
78 78
     public static function create(callable $factory)
79 79
     {
80
-        return function (RequestInterface $request, ResponseInterface $response, callable $next) use ($factory) {
80
+        return function(RequestInterface $request, ResponseInterface $response, callable $next) use ($factory) {
81 81
             $middleware = $factory();
82 82
 
83 83
             if ($middleware === false) {
Please login to merge, or discard this patch.
src/Middleware/Csrf.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      * @param ServerRequestInterface $request
75 75
      * @param string                 $lockTo
76 76
      *
77
-     * @return array
77
+     * @return string[]
78 78
      */
79 79
     private function generateTokens(ServerRequestInterface $request, $lockTo)
80 80
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $response = $next($request, $response);
56 56
 
57
-        return $this->insertIntoPostForms($response, function ($match) use ($request) {
57
+        return $this->insertIntoPostForms($response, function($match) use ($request) {
58 58
             preg_match('/action=["\']?([^"\'\s]+)["\']?/i', $match[0], $matches);
59 59
 
60 60
             $action = empty($matches[1]) ? $request->getUri()->getPath() : $matches[1];
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             return;
152 152
         }
153 153
 
154
-        uasort($_SESSION[$this->sessionIndex], function ($a, $b) {
154
+        uasort($_SESSION[$this->sessionIndex], function($a, $b) {
155 155
             return $a['created'] - $b['created'];
156 156
         });
157 157
 
Please login to merge, or discard this patch.
src/Middleware/FormTimestamp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
 
102 102
         $value = $this->encrypt(time());
103 103
 
104
-        return $this->insertIntoPostForms($response, function ($match) use ($value) {
104
+        return $this->insertIntoPostForms($response, function($match) use ($value) {
105 105
             return $match[0].'<input type="text" name="'.$this->inputName.'" value="'.$value.'">';
106 106
         });
107 107
     }
Please login to merge, or discard this patch.
src/Middleware/Honeypot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
         $response = $next($request, $response);
79 79
 
80
-        return $this->insertIntoPostForms($response, function ($match) {
80
+        return $this->insertIntoPostForms($response, function($match) {
81 81
             return $match[0].'<input type="text" name="'.$this->inputName.'" class="'.$this->inputClass.'">';
82 82
         });
83 83
     }
Please login to merge, or discard this patch.
src/Utils/Helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,6 +126,6 @@
 block discarded – undo
126 126
             return hash_equals($a, $b);
127 127
         }
128 128
 
129
-        return substr_count($a ^ $b, "\0") * 2 === strlen($a . $b);
129
+        return substr_count($a ^ $b, "\0") * 2 === strlen($a.$b);
130 130
     }
131 131
 }
Please login to merge, or discard this patch.