Completed
Push — master ( 057667...e5b259 )
by Charles
01:56
created
filters/auth/HMACSignatureAuth.php 4 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     private function isHMACSignatureValid($accessToken, $ikm, $salt, $request, $hmac = null)
93 93
     {
94 94
         static $selfHMAC = null;
95
-        static $hkdf   = null;
95
+        static $hkdf = null;
96 96
         
97 97
         // Null check the HMAC string
98 98
         if (empty($hmac) || $hmac === null) {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,6 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param string $accessToken
88 88
      * @param string $salt
89 89
      * @param \yii\web\request $request
90
+     * @param string $ikm
90 91
      * @return bool
91 92
      */
92 93
     private function isHMACSignatureValid($accessToken, $ikm, $salt, $request, $hmac = null)
@@ -152,7 +153,7 @@  discard block
 block discarded – undo
152 153
     
153 154
     /**
154 155
      * Gets the datetime drift that has occured since the request was sent
155
-     * @param yii\web\Request $request
156
+     * @param \yii\web\Request $request
156 157
      * @return int
157 158
      */
158 159
     private function getTimeDrift($request)
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -137,9 +137,9 @@
 block discarded – undo
137 137
 
138 138
         // Calculate the signature string
139 139
         $signatureString = hash('sha256', $body) . "\n" .
140
-                           $request->method . "+" . $request->getUrl() . "\n" .
141
-                           $request->getHeaders()->get(self::DATE_HEADER) . "\n" .
142
-                           \base64_encode($salt);
140
+                            $request->method . "+" . $request->getUrl() . "\n" .
141
+                            $request->getHeaders()->get(self::DATE_HEADER) . "\n" .
142
+                            \base64_encode($salt);
143 143
        
144 144
         Yii::trace([
145 145
             'message' => sprintf('Derived Signature String %s', $signatureString),
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\filters\auth;
4 4
 
5
-use yii\helpers\Json;
6 5
 use yii\filters\auth\AuthMethod;
7
-
8 6
 use Yii;
9 7
 
10 8
 /**
Please login to merge, or discard this patch.
rest/Action.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,10 +3,7 @@
 block discarded – undo
3 3
 namespace yrc\rest;
4 4
 
5 5
 use yii\web\HttpException;
6
-use yii\helpers\ArrayHelper;
7 6
 use Yii;
8
-use ReflectionProperty;
9
-use ReflectionClass;
10 7
 
11 8
 abstract class Action extends \yii\base\Action
12 9
 {
Please login to merge, or discard this patch.
web/JsonResponseFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 $response->data['status'] = $status;
60 60
 
61 61
                 if ($response->data['data'] === [] || $response->data['data'] === null) {
62
-                    $response->data['data'] =  null;
62
+                    $response->data['data'] = null;
63 63
                 }
64 64
             }
65 65
 
Please login to merge, or discard this patch.
web/Response.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace yrc\web;
4 4
 
5 5
 use yii\web\Response as YiiResponse;
6
-use Yii;
7 6
 
8 7
 class Response extends YiiResponse
9 8
 {
Please login to merge, or discard this patch.
rest/Controller.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,7 @@
 block discarded – undo
11 11
 use yii\web\HttpException;
12 12
 use yii\web\ForbiddenHttpException;
13 13
 use yrc\web\Response;
14
-
15 14
 use Yii;
16
-
17 15
 use ReflectionClass;
18 16
 use ReflectionMethod;
19 17
 
Please login to merge, or discard this patch.
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.
actions/AuthenticationAction.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
     /**
40 40
      * Deauthenticates a user
41
-     * @return mixed
41
+     * @return boolean
42 42
      */
43 43
     public function delete($params)
44 44
     {
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 app\forms\Login;
6 6
 use yrc\rest\Action as RestAction;
7
-
8 7
 use yii\web\UnauthorizedHttpException;
9 8
 use Yii;
10 9
 
Please login to merge, or discard this patch.
actions/ChangeEmailAction.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\ChangeEmail;
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.
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.