Passed
Push — master ( ac48a9...31bd7d )
by Roeland
11:49
created
apps/twofactor_backupcodes/lib/Controller/SettingsController.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -30,37 +30,37 @@
 block discarded – undo
30 30
 
31 31
 class SettingsController extends Controller {
32 32
 
33
-	/** @var BackupCodeStorage */
34
-	private $storage;
33
+    /** @var BackupCodeStorage */
34
+    private $storage;
35 35
 
36
-	/** @var IUserSession */
37
-	private $userSession;
36
+    /** @var IUserSession */
37
+    private $userSession;
38 38
 
39
-	/**
40
-	 * @param string $appName
41
-	 * @param IRequest $request
42
-	 * @param BackupCodeStorage $storage
43
-	 * @param IUserSession $userSession
44
-	 */
45
-	public function __construct($appName, IRequest $request, BackupCodeStorage $storage, IUserSession $userSession) {
46
-		parent::__construct($appName, $request);
47
-		$this->userSession = $userSession;
48
-		$this->storage = $storage;
49
-	}
39
+    /**
40
+     * @param string $appName
41
+     * @param IRequest $request
42
+     * @param BackupCodeStorage $storage
43
+     * @param IUserSession $userSession
44
+     */
45
+    public function __construct($appName, IRequest $request, BackupCodeStorage $storage, IUserSession $userSession) {
46
+        parent::__construct($appName, $request);
47
+        $this->userSession = $userSession;
48
+        $this->storage = $storage;
49
+    }
50 50
 
51
-	/**
52
-	 * @NoAdminRequired
53
-	 * @PasswordConfirmationRequired
54
-	 *
55
-	 * @return JSONResponse
56
-	 */
57
-	public function createCodes() {
58
-		$user = $this->userSession->getUser();
59
-		$codes = $this->storage->createCodes($user);
60
-		return new JSONResponse([
61
-			'codes' => $codes,
62
-			'state' => $this->storage->getBackupCodesState($user),
63
-		]);
64
-	}
51
+    /**
52
+     * @NoAdminRequired
53
+     * @PasswordConfirmationRequired
54
+     *
55
+     * @return JSONResponse
56
+     */
57
+    public function createCodes() {
58
+        $user = $this->userSession->getUser();
59
+        $codes = $this->storage->createCodes($user);
60
+        return new JSONResponse([
61
+            'codes' => $codes,
62
+            'state' => $this->storage->getBackupCodesState($user),
63
+        ]);
64
+    }
65 65
 
66 66
 }
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/appinfo/routes.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
  */
22 22
 // @codeCoverageIgnoreStart
23 23
 return [
24
-	'routes' => [
25
-		[
26
-			'name' => 'settings#createCodes',
27
-			'url' => '/settings/create',
28
-			'verb' => 'POST'
29
-		],
30
-	]
24
+    'routes' => [
25
+        [
26
+            'name' => 'settings#createCodes',
27
+            'url' => '/settings/create',
28
+            'verb' => 'POST'
29
+        ],
30
+    ]
31 31
 ];
32 32
 // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.