Completed
Branch master (d7035c)
by Charles
03:27
created
api/actions/ActivationAction.php 1 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 app\forms\Activation;
6 6
 use yrc\rest\Action as RestAction;
7
-
8 7
 use yii\web\HttpException;
9 8
 use Yii;
10 9
 
Please login to merge, or discard this patch.
api/actions/AuthenticationAction.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
     /**
45 45
      * Deauthenticates a user
46
-     * @return mixed
46
+     * @return boolean
47 47
      */
48 48
     public static function delete($params)
49 49
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use app\forms\Login;
6 6
 use app\models\Token;
7 7
 use yrc\rest\Action as RestAction;
8
-
9 8
 use yii\web\UnauthorizedHttpException;
10 9
 use Yii;
11 10
 
Please login to merge, or discard this patch.
api/actions/OTPAction.php 1 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 app\models\User;
6 6
 use yrc\rest\Action as RestAction;
7
-
8 7
 use yii\web\HttpException;
9 8
 use Yii;
10 9
 
Please login to merge, or discard this patch.
api/actions/RefreshAction.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
5 5
 use yrc\api\actions\AuthenticationAction;
6 6
 use app\models\User\Token;
7 7
 use yrc\rest\Action as RestAction;
8
-
9
-use yii\web\UnauthorizedHttpException;
10 8
 use Yii;
11 9
 
12 10
 /**
Please login to merge, or discard this patch.
api/actions/RegistrationAction.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * [POST] /api/[...]/register
19 19
      * Handles registration of users
20
-     * @return mixed
20
+     * @return boolean
21 21
      */
22 22
     public static function post($params)
23 23
     {
Please login to merge, or discard this 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\api\actions;
4 4
 
5
-use app\forms\Register;
6 5
 use yrc\rest\Action as RestAction;
7
-
8 6
 use yii\web\HttpException;
9 7
 use Yii;
10 8
 
Please login to merge, or discard this patch.
api/forms/Activation.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\api\forms;
4 4
 
5
-use Base32\Base32;
6 5
 use Yii;
7 6
 
8 7
 /**
Please login to merge, or discard this patch.
api/forms/Login.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
     /**
73 73
      * Validates the users' password and OTP code
74
-     * @param array $attributes
74
+     * @param array $attribute
75 75
      * @param array $params
76 76
      */
77 77
     public function validatePasswordAndOTP($attribute, $params)
Please login to merge, or discard this patch.
api/models/Token.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,6 @@
 block discarded – undo
97 97
 
98 98
     /**
99 99
      * Retrieves an instance of self
100
-     * @param string $tokenString   The string access token
101 100
      * @return Token|null
102 101
      */
103 102
     public static function find(array $params = [])
Please login to merge, or discard this patch.
api/models/User.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
     
225 225
     /**
226 226
      * Provisions TOTP for the account
227
-     * @return boolean|string
227
+     * @return false|string
228 228
      */
229 229
     public function provisionOTP()
230 230
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,10 +3,8 @@
 block discarded – undo
3 3
 namespace yrc\api\models;
4 4
 
5 5
 use app\models\User\Token;
6
-
7 6
 use Base32\Base32;
8 7
 use OTPHP\TOTP;
9
-
10 8
 use yii\behaviors\TimestampBehavior;
11 9
 use yii\db\ActiveRecord;
12 10
 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
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
         $totp = new TOTP(
238 238
             $this->email,
239 239
             $encodedSecret,
240
-            30,             // 30 second window
241
-            'sha256',       // SHA256 for the hashing algorithm
240
+            30, // 30 second window
241
+            'sha256', // SHA256 for the hashing algorithm
242 242
             6               // 6 digits
243 243
         );
244 244
 
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
         $totp = new TOTP(
293 293
             $this->email,
294 294
             $this->otp_secret,
295
-            30,             // 30 second window
296
-            'sha256',       // SHA256 for the hashing algorithm
295
+            30, // 30 second window
296
+            'sha256', // SHA256 for the hashing algorithm
297 297
             6               // 6 digits
298 298
         );
299 299
 
Please login to merge, or discard this patch.