Passed
Push — master ( 5c2740...f1e48c )
by Stefan
03:35
created
src/WebAuthn/WebAuthnAbstractEvent.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
         return $this->credential;
183 183
     }
184 184
 
185
-   /**
185
+    /**
186 186
      * @return int
187 187
      */
188 188
     public function getAlgo(): int
Please login to merge, or discard this patch.
src/Controller/RegProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
         $id = $this->authState::saveState($state, 'webauthn:request');
197 197
         if ($debugEnabled === true) {
198 198
             $response = new RunnableResponse(
199
-                function (WebAuthnRegistrationEvent $regObject, string $id) {
199
+                function(WebAuthnRegistrationEvent $regObject, string $id) {
200 200
                     echo $regObject->getDebugBuffer();
201 201
                     echo $regObject->getValidateBuffer();
202 202
                     echo "<form id='regform' method='POST' action='" .
Please login to merge, or discard this patch.
src/Controller/WebAuthn.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
             }
110 110
             return self::STATE_AUTH_ALLOWMGMT;
111 111
         } else { // in inflow, allow to check the management box; otherwise,
112
-                 // only auth
112
+                    // only auth
113 113
             $moduleConfig = Configuration::getOptionalConfig('module_webauthn.php')->toArray();
114 114
             return $moduleConfig['registration']['use_inflow_registration'] ? self::STATE_AUTH_ALLOWMGMT : self::STATE_AUTH_NOMGMT;
115 115
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
     }
111 111
 
112
-    public static function loadModuleConfig(array $moduleConfig, StateData &$stateData): void
112
+    public static function loadModuleConfig(array $moduleConfig, StateData & $stateData): void
113 113
     {
114 114
         $stateData->store = Store::parseStoreConfig($moduleConfig['store']);
115 115
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $frontendData = [];
210 210
         $frontendData['challengeEncoded'] = $challengeEncoded;
211 211
         $frontendData['state'] = [];
212
-        foreach (['FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
212
+        foreach (['FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) {
213 213
             $frontendData['state'][$stateItem] = $state[$stateItem];
214 214
         }
215 215
 
Please login to merge, or discard this patch.
src/Controller/PushbackUserPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         // this is the confirmed username, we store it just like the Passwordless
132 132
         // one would have been
133 133
         
134
-        $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $request->request->get("username") ];
134
+        $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$request->request->get("username")];
135 135
 
136 136
         // we deliberately do not store any additional attributes - these have
137 137
         // to be retrieved from the same authproc that would retrieve them
Please login to merge, or discard this patch.
src/Controller/Supercharged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
         $frontendData = [];
216 216
         $frontendData['challengeEncoded'] = $challengeEncoded;
217 217
         $frontendData['state'] = [];
218
-        foreach (['FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) {
218
+        foreach (['FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) {
219 219
             $frontendData['state'][$stateItem] = $state[$stateItem];
220 220
         }
221 221
 
Please login to merge, or discard this patch.
src/WebAuthn/WebAuthnRegistrationEvent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
     }
497 497
 
498 498
     // Keymaster 3 - KeyMint ???
499
-    private const ORIGINS_3 = [ // https://source.android.com/docs/security/features/keystore/tags#origin
499
+    private const ORIGINS_3 = [// https://source.android.com/docs/security/features/keystore/tags#origin
500 500
         0 => "GENERATED",
501 501
         1 => "DERIVED",
502 502
         2 => "IMPORTED",
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
          * STEP 13 of the validation procedure in § 7.1 of the spec: is the algorithm the expected one?
712 712
          */
713 713
         if (in_array($arrayPK['3'], self::PK_ALGORITHM)) { // we requested -7 or -257, so want to see it here
714
-            $this->algo = (int)$arrayPK['3'];
714
+            $this->algo = (int) $arrayPK['3'];
715 715
             $this->pass("Public Key Algorithm is expected (" . implode(' or ', WebAuthnRegistrationEvent::PK_ALGORITHM) . ").");
716 716
         } else {
717 717
             $this->fail("Public Key Algorithm mismatch!");
Please login to merge, or discard this patch.
src/Controller/AuthProcess.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             base64_decode($request->request->get('client_data_raw')),
168 168
             $oneToken[0],
169 169
             $oneToken[1],
170
-            (int)$oneToken[4], // algo
170
+            (int) $oneToken[4], // algo
171 171
             base64_decode($request->request->get('signature')),
172 172
             $debugEnabled,
173 173
         );
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         if ($debugEnabled) {
227 227
             $response = new RunnableResponse(
228
-                function (WebAuthnAuthenticationEvent $authObject, array $state) {
228
+                function(WebAuthnAuthenticationEvent $authObject, array $state) {
229 229
                     echo $authObject->getDebugBuffer();
230 230
                     echo $authObject->getValidateBuffer();
231 231
                     echo "Debug mode, not continuing to " . ($state['FIDO2WantsRegister'] ? "credential registration page." : "destination.");
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
              * In passwordless, we're on our own. The one thing we know is the
250 250
              * username.
251 251
              */
252
-            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [ $state['FIDO2Username'] ];
252
+            $state['Attributes'][$state['FIDO2AttributeStoringUsername']] = [$state['FIDO2Username']];
253 253
             // in case this authentication happened in the Supercharged context
254 254
             // it may be that there is an authprocfilter for WebAuthN, too.
255 255
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             }
268 268
             // set an internal "authenticated passwordless" hint somewhere else
269 269
             // in $state, which the authproc can react upon
270
-            $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [ $state['FIDO2Username'] ];
270
+            $state['Attributes']['internal:FIDO2PasswordlessAuthentication'] = [$state['FIDO2Username']];
271 271
 
272 272
             $this->authState::saveState($state, 'webauthn:request');
273 273
 
Please login to merge, or discard this patch.
src/Store.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
      *
153 153
      * @throws \Exception if the configuration is invalid.
154 154
      */
155
-    public static function parseStoreConfig(string|array $config): Store
155
+    public static function parseStoreConfig(string | array $config): Store
156 156
     {
157 157
         if (is_string($config)) {
158 158
             $arrayUtils = new Utils\Arrays();
Please login to merge, or discard this patch.
src/Auth/Process/WebAuthn.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
         $session = Session::getSessionFromRequest();
146 146
         $lastSecondFactor = $session->getData("DateTime", 'LastSuccessfulSecondFactor');
147 147
         if // do we need to do secondFactor in interval, or even every time?
148
-           // we skip only if an interval is configured AND we did successfully authenticate, AND are within the interval
148
+            // we skip only if an interval is configured AND we did successfully authenticate, AND are within the interval
149 149
         (
150 150
                 $this->SecondFactorMaxAge >= 0 && // 
151 151
                 (
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
                 $lastSecondFactor instanceof \DateTime
154 154
                 )
155 155
         ) {
156
-            $interval = $lastSecondFactor->diff( \DateTime());
156
+            $interval = $lastSecondFactor->diff(\DateTime());
157 157
             if ($interval->invert == 1) {
158 158
                 throw new \Exception("We are talking to a future self. Amazing.");
159 159
             }
Please login to merge, or discard this patch.