Failed Conditions
Push — master ( 9635a1...82855d )
by Florent
14:04
created
src/Component/Server/TokenType/MacToken.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
     private function getParametersToCheck(): array
126 126
     {
127 127
         return [
128
-            'id' => function ($value, AccessToken $accessToken) {
128
+            'id' => function($value, AccessToken $accessToken) {
129 129
                 return hash_equals($accessToken->getTokenId()->getValue(), $value);
130 130
             },
131
-            'ts' => function ($value) {
131
+            'ts' => function($value) {
132 132
                 return time() < $this->getTimestampLifetime() + (int) $value;
133 133
             },
134
-            'nonce' => function () {
134
+            'nonce' => function() {
135 135
                 return true;
136 136
             },
137 137
         ];
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
         $ext = array_key_exists('ext', $values) ? $values['ext'] : null;
156 156
 
157 157
         $basestr =
158
-            $timestamp . "\n" .
159
-            $nonce . "\n" .
160
-            $method . "\n" .
161
-            $request_uri . "\n" .
162
-            $host . "\n" .
163
-            $port . "\n" .
164
-            $ext . "\n";
158
+            $timestamp."\n".
159
+            $nonce."\n".
160
+            $method."\n".
161
+            $request_uri."\n".
162
+            $host."\n".
163
+            $port."\n".
164
+            $ext."\n";
165 165
 
166 166
         $algorithms = $this->getAlgorithmMap();
167 167
         Assertion::keyExists($algorithms, $token->getParameter('mac_algorithm'), sprintf('The MAC algorithm \'%s\' is not supported.', $token->getParameter('mac_algorithm')));
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      *
193 193
      * @return bool
194 194
      */
195
-    private function isHeaderValid(string $header, array &$additionalCredentialValues, string &$token = null): bool
195
+    private function isHeaderValid(string $header, array &$additionalCredentialValues, string & $token = null): bool
196 196
     {
197 197
         if (1 === preg_match('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches)) {
198 198
             preg_match_all('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches, PREG_SET_ORDER);
Please login to merge, or discard this patch.
src/Component/Server/TokenType/BearerToken.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         }
147 147
 
148 148
         foreach ($authorization_headers as $authorization_header) {
149
-            if (1 === preg_match('/' . preg_quote('Bearer', '/') . '\s([a-zA-Z0-9\-_\+~\/\.]+)/', $authorization_header, $matches)) {
149
+            if (1 === preg_match('/'.preg_quote('Bearer', '/').'\s([a-zA-Z0-9\-_\+~\/\.]+)/', $authorization_header, $matches)) {
150 150
                 return $matches[1];
151 151
             }
152 152
         }
Please login to merge, or discard this patch.
src/Component/Server/TokenType/TokenTypeManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @return string|null
91 91
      */
92
-    public function findToken(ServerRequestInterface $request, array &$additionalCredentialValues, TokenTypeInterface &$type = null)
92
+    public function findToken(ServerRequestInterface $request, array &$additionalCredentialValues, TokenTypeInterface & $type = null)
93 93
     {
94 94
         foreach ($this->all() as $tmp_type) {
95 95
             $tmpAdditionalCredentialValues = [];
Please login to merge, or discard this patch.
Component/Server/GrantType/ResourceOwnerPasswordCredentialsGrantType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.
src/Component/Server/GrantType/ClientCredentialsGrantType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.
src/Component/Server/GrantType/GrantTypeManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.
src/Component/Server/GrantType/PKCEMethod/PKCEMethodManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.
src/Component/Server/GrantType/PKCEMethod/S256.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.
src/Component/Server/GrantType/PKCEMethod/PKCEMethodInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * The MIT License (MIT)
Please login to merge, or discard this patch.