@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace yrc\rest; |
4 | 4 | |
5 | 5 | use yii\web\HttpException; |
6 | -use yii\helpers\ArrayHelper; |
|
7 | 6 | use Yii; |
8 | 7 | use ReflectionProperty; |
9 | 8 | use ReflectionClass; |
@@ -4,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use app\forms\ResetPassword; |
6 | 6 | use yrc\rest\Action as RestAction; |
7 | -use yrc\api\models\Code; |
|
8 | - |
|
9 | 7 | use yii\web\HttpException; |
10 | 8 | use Yii; |
11 | 9 |
@@ -2,9 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace yrc\api\forms; |
4 | 4 | |
5 | -use Base32\Base32; |
|
6 | 5 | use Yii; |
7 | - |
|
8 | 6 | use yrc\api\models\Code; |
9 | 7 | |
10 | 8 | /** |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // Pull the exception |
31 | 31 | $exception = Yii::$app->errorHandler->exception; |
32 | - if ($exception && is_subclass_of($exception, 'yii\web\HttpException') || get_class($exception) === 'yii\web\HttpException' ) { |
|
32 | + if ($exception && is_subclass_of($exception, 'yii\web\HttpException') || get_class($exception) === 'yii\web\HttpException') { |
|
33 | 33 | $copy = $response->data; |
34 | 34 | $response->data = null; |
35 | 35 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $response->data['status'] = $status; |
65 | 65 | |
66 | 66 | if ($response->data['data'] === [] || $response->data['data'] === null) { |
67 | - $response->data['data'] = null; |
|
67 | + $response->data['data'] = null; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $token->user_id = $userId; |
49 | 49 | $token->access_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
50 | 50 | $token->refresh_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
51 | - $token->ikm = \base64_encode(\random_bytes(32)); |
|
51 | + $token->ikm = \base64_encode(\random_bytes(32)); |
|
52 | 52 | $token->expires_at = strtotime(self::TOKEN_EXPIRATION_TIME); |
53 | 53 | |
54 | 54 | if ($token->save()) { |
@@ -94,6 +94,8 @@ |
||
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 | { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Adds client connections |
24 | 24 | * @param array $clients |
25 | - * @return true |
|
25 | + * @return boolean |
|
26 | 26 | */ |
27 | 27 | public function setClients($clients = []) |
28 | 28 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Retrieves the queue |
38 | - * @return Disque\Client |
|
38 | + * @return Client |
|
39 | 39 | */ |
40 | 40 | public function get() |
41 | 41 | { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace yrc\components; |
4 | 4 | |
5 | -use Yii; |
|
6 | 5 | use yii\base\Object; |
7 | 6 | use Disque\Connection\Credentials; |
8 | 7 | use Disque\Client; |