Completed
Push — master ( 188d66...fb5d7d )
by Charles
01:53
created
forms/ChangeEmail.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace yrc\forms;
4 4
 
5
-use Base32\Base32;
6 5
 use Yii;
7 6
 
8 7
 /**
Please login to merge, or discard this patch.
forms/ResetPassword.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -94,6 +94,8 @@
 block discarded – undo
94 94
     /**
95 95
      * Validates the users OTP code, if they provided
96 96
      * @inheritdoc
97
+     * @param string $attributes
98
+     * @param string $params
97 99
      */
98 100
     public function validateOTP($attributes, $params)
99 101
     {
Please login to merge, or discard this patch.
models/User.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Base32\Base32;
6 6
 use OTPHP\TOTP;
7
-
8 7
 use yii\behaviors\TimestampBehavior;
9 8
 use yii\db\ActiveRecord;
10 9
 use yii\filters\RateLimitInterface;
Please login to merge, or discard this 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.
models/redis/Token.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $token->user_id = $userId;
73 73
         $token->access_token = \str_replace('=', '', Base32::encode(\random_bytes(32)));
74 74
         $token->refresh_token = \str_replace('=', '', Base32::encode(\random_bytes(32)));
75
-        $token->ikm =  \base64_encode(\random_bytes(32));
75
+        $token->ikm = \base64_encode(\random_bytes(32));
76 76
         $token->secret_sign_kp = \base64_encode(sodium_crypto_sign_secretkey($signKp));
77 77
         $token->expires_at = \strtotime(static::TOKEN_EXPIRATION_TIME);
78 78
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace yrc\models\redis;
4 4
 
5 5
 use Base32\Base32;
6
-use yrc\models\TokenKeyPair;
7 6
 use Yii;
8 7
 
9 8
 /**
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     }
46 46
 
47 47
     /**
48
-     * @return sodium_crypto_sign_publickey
48
+     * @return string
49 49
      */
50 50
     public function getSignPublicKey()
51 51
     {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Generates a new auth and refresh token pair
57 57
      * @param int $userId
58
-     * @return array
58
+     * @return Token
59 59
      */
60 60
     public static function generate($userId = null)
61 61
     {
Please login to merge, or discard this patch.
forms/Activation.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace yrc\forms;
4 4
 
5
-use Base32\Base32;
6 5
 use Yii;
7
-
8 6
 use yrc\models\redis\Code;
9 7
 
10 8
 /**
Please login to merge, or discard this patch.
actions/ResetPasswordAction.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use app\forms\ResetPassword;
6 6
 use yrc\rest\Action as RestAction;
7
-use yrc\models\redis\Code;
8
-
9 7
 use yii\web\HttpException;
10 8
 use Yii;
11 9
 
Please login to merge, or discard this patch.
components/RPQComponent.php 1 patch
Unused Use Statements   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,10 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace yrc\components;
4 4
 
5
-use Redis;
6
-use RPQ\Client;
5
+use Redis;
6
+use RPQ\Client;
7 7
 use yii\base\BaseObject;
8
-use Yii;
9 8
 
10 9
 final class RPQComponent extends BaseObject
11 10
 {
Please login to merge, or discard this patch.
commands/WorkerController.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     /**
24 24
      * Command line options
25 25
      * @param string $actionID
26
-     * @return array
26
+     * @return string[]
27 27
      */
28 28
     public function options($actionID)
29 29
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace yrc\commands;
4 4
 
5
-use Exception;
6
-use yii\console\Controller;
5
+use Exception;
6
+use yii\console\Controller;
7 7
 use Yii;
8 8
 
9 9
 class WorkerController extends Controller
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace yrc\commands;
4 4
 
Please login to merge, or discard this patch.
models/redis/EncryptionKey.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     /**
17 17
      * Model attributes
18
-     * @return array
18
+     * @return string[]
19 19
      */
20 20
     public function attributes()
21 21
     {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-     * @return sodium_crypto_box_publickey
31
+     * @return string
32 32
      */
33 33
     public function getBoxPublicKey()
34 34
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ramsey\Uuid\Uuid;
6 6
 use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
7
-
8 7
 use yrc\redis\ActiveRecord;
9 8
 use Yii;
10 9
 
Please login to merge, or discard this patch.