Passed
Push — master ( ef2c3a...436bae )
by Charles
03:58
created
models/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -273,8 +273,8 @@  discard block
 block discarded – undo
273 273
         $encodedSecret = Base32::encode($secret);
274 274
         $totp = TOTP::create(
275 275
             $encodedSecret,
276
-            30,             // 30 second window
277
-            'sha256',       // SHA256 for the hashing algorithm
276
+            30, // 30 second window
277
+            'sha256', // SHA256 for the hashing algorithm
278 278
             6               // 6 digits
279 279
         );
280 280
         $totp->setLabel($this->username);
@@ -328,8 +328,8 @@  discard block
 block discarded – undo
328 328
     {
329 329
         $totp = TOTP::create(
330 330
             $this->otp_secret,
331
-            30,             // 30 second window
332
-            'sha256',       // SHA256 for the hashing algorithm
331
+            30, // 30 second window
332
+            'sha256', // SHA256 for the hashing algorithm
333 333
             6               // 6 digits
334 334
         );
335 335
 
Please login to merge, or discard this patch.
components/HttpClientComponent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $this->client->on(Client::EVENT_AFTER_SEND, function(RequestEvent $e) {
63 63
             Yii::debug([
64 64
                 'message' => sprintf('Recieved HTTP response HTTP [%s] | [%s] %s', $e->response->getStatusCode(), $e->request->getMethod(), $e->request->getFullUrl()),
65
-                'data' => (function () use ($e) {
65
+                'data' => (function() use ($e) {
66 66
                     $content = $e->response->getContent();
67 67
                     if (preg_match('~[^\x20-\x7E\t\r\n]~', $content) > 0) {
68 68
                         return '[binary data]';
Please login to merge, or discard this patch.
actions/AuthenticationAction.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -53,25 +53,25 @@
 block discarded – undo
53 53
     }
54 54
 
55 55
     /**
56
-    * Retrieves a Token object from an access token string
57
-    * @param string $accessToken
58
-    * @return \yrc\models\redis\Token
59
-    */
60
-   private function getTokenFromAccessToken(string $accessToken)
61
-   {
62
-       try {
63
-           $tokenClass = (Yii::$app->user->identityClass::TOKEN_CLASS);
64
-           $token = $tokenClass::find()
65
-               ->where(['access_token' => $accessToken])
66
-               ->one();
67
-       } catch (\Exception $e) {
68
-           return null;
69
-       }
56
+     * Retrieves a Token object from an access token string
57
+     * @param string $accessToken
58
+     * @return \yrc\models\redis\Token
59
+     */
60
+    private function getTokenFromAccessToken(string $accessToken)
61
+    {
62
+        try {
63
+            $tokenClass = (Yii::$app->user->identityClass::TOKEN_CLASS);
64
+            $token = $tokenClass::find()
65
+                ->where(['access_token' => $accessToken])
66
+                ->one();
67
+        } catch (\Exception $e) {
68
+            return null;
69
+        }
70 70
 
71
-       if ($token === null || $token->isExpired()) {
72
-           return null;
73
-       }
71
+        if ($token === null || $token->isExpired()) {
72
+            return null;
73
+        }
74 74
 
75
-       return $token;
76
-   }
75
+        return $token;
76
+    }
77 77
 }
Please login to merge, or discard this patch.