Passed
Pull Request — master (#30)
by
unknown
03:11
created
www/managetoken.php 1 patch
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -29,28 +29,28 @@
 block discarded – undo
29 29
     throw new Exception("Attempt to access the token management page unauthenticated.");
30 30
 }
31 31
 switch ($_POST['submit']) {
32
-    case "NEVERMIND":
33
-        Auth\ProcessingChain::resumeProcessing($state);
34
-        break;
35
-    case "DELETE":
36
-        if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) {
37
-            throw new Exception("Attempt to delete the currently used credential despite UI preventing this.");
38
-        }
39
-        $store = $state['webauthn:store'];
40
-        $store->deleteTokenData($_POST['credId']);
41
-        if (array_key_exists('Registration', $state)) {
42
-            foreach ($state['FIDO2Tokens'] as $key => $value) {
43
-                if ($state['FIDO2Tokens'][$key][0] == $_POST['credId']) {
44
-                    unset($state['FIDO2Tokens'][$key]);
45
-                    break;
46
-                }
32
+        case "NEVERMIND":
33
+            Auth\ProcessingChain::resumeProcessing($state);
34
+            break;
35
+        case "DELETE":
36
+            if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) {
37
+                throw new Exception("Attempt to delete the currently used credential despite UI preventing this.");
47 38
             }
39
+            $store = $state['webauthn:store'];
40
+            $store->deleteTokenData($_POST['credId']);
41
+            if (array_key_exists('Registration', $state)) {
42
+                foreach ($state['FIDO2Tokens'] as $key => $value) {
43
+                    if ($state['FIDO2Tokens'][$key][0] == $_POST['credId']) {
44
+                        unset($state['FIDO2Tokens'][$key]);
45
+                        break;
46
+                    }
47
+                }
48 48
 
49
-            StaticProcessHelper::saveStateAndRedirect($state);
50
-        } else {
51
-            Auth\ProcessingChain::resumeProcessing($state);
52
-        }
53
-        break;
54
-    default:
55
-        throw new Exception("Unknown submit button state.");
49
+                StaticProcessHelper::saveStateAndRedirect($state);
50
+            } else {
51
+                Auth\ProcessingChain::resumeProcessing($state);
52
+            }
53
+            break;
54
+        default:
55
+            throw new Exception("Unknown submit button state.");
56 56
 }
Please login to merge, or discard this patch.