Completed
Push — devel ( f78bd1...13d8c8 )
by Philippe
11s
created
src/services/mySql/ClientService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             ->where('id = :id', [':id' => $clientKey])
85 85
             ->one($this->db);
86 86
         if ($entity !== false) {
87
-            throw new DuplicateKeyException('Duplicate key "' . $clientKey . '"');
87
+            throw new DuplicateKeyException('Duplicate key "'.$clientKey.'"');
88 88
         }
89 89
         $values = $client->getDirtyAttributes($attributes);
90 90
         $clientParameters = [];
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                 ->where('id = :id', [':id' => $values[$modelKey]])
163 163
                 ->one($this->db);
164 164
             if ($entity !== false) {
165
-                throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"');
165
+                throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"');
166 166
             }
167 167
         }
168 168
         $clientKey = isset($values[$modelKey]) ? $values[$modelKey] : $client->getKey();
Please login to merge, or discard this patch.
src/services/mySql/AuthCodeService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             ->where('id = :id', [':id' => $authCodeKey])
72 72
             ->one($this->db);
73 73
         if ($entity !== false) {
74
-            throw new DuplicateKeyException('Duplicate key "' . $authCodeKey . '"');
74
+            throw new DuplicateKeyException('Duplicate key "'.$authCodeKey.'"');
75 75
         }
76 76
         $values = $authCode->getDirtyAttributes($attributes);
77 77
         $authCodeParameters = [];
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 ->where('id = :id', [':id' => $values[$modelKey]])
138 138
                 ->one($this->db);
139 139
             if ($entity !== false) {
140
-                throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"');
140
+                throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"');
141 141
             }
142 142
         }
143 143
         $authCodeKey = isset($values[$modelKey]) ? $values[$modelKey] : $authCode->getKey();
Please login to merge, or discard this patch.
src/services/mySql/ScopeService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             ->where('id = :id', [':id' => $scope->id])
73 73
             ->one($this->db);
74 74
         if ($entity !== false) {
75
-            throw new DuplicateKeyException('Duplicate key "' . $scope->id . '"');
75
+            throw new DuplicateKeyException('Duplicate key "'.$scope->id.'"');
76 76
         }
77 77
         $values = $scope->getDirtyAttributes($attributes);
78 78
         $scopeParameters = [];
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                 ->where('id = :id', [':id' => $values[$modelKey]])
127 127
                 ->one($this->db);
128 128
             if ($entity !== false) {
129
-                throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"');
129
+                throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"');
130 130
             }
131 131
         }
132 132
         $scopeKey = isset($values[$modelKey]) ? $values[$modelKey] : $scope->getKey();
Please login to merge, or discard this patch.
src/services/mySql/CypherKeyService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             ->where('id = :id', [':id' => $cypherKeyKey])
67 67
             ->one($this->db);
68 68
         if ($entity !== false) {
69
-            throw new DuplicateKeyException('Duplicate key "' . $cypherKeyKey . '"');
69
+            throw new DuplicateKeyException('Duplicate key "'.$cypherKeyKey.'"');
70 70
         }
71 71
         $values = $cypherKey->getDirtyAttributes($attributes);
72 72
         $cypherKeyParameters = [];
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 ->where('id = :id', [':id' => $values[$modelKey]])
121 121
                 ->one($this->db);
122 122
             if ($entity !== false) {
123
-                throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"');
123
+                throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"');
124 124
             }
125 125
         }
126 126
         $cypherKeyKey = isset($values[$modelKey]) ? $values[$modelKey] : $cypherKey->getKey();
Please login to merge, or discard this patch.
src/services/mySql/JtiService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             ->where('id = :id', [':id' => $jtiKey])
68 68
             ->one($this->db);
69 69
         if ($entity !== false) {
70
-            throw new DuplicateKeyException('Duplicate key "' . $jtiKey . '"');
70
+            throw new DuplicateKeyException('Duplicate key "'.$jtiKey.'"');
71 71
         }
72 72
         $values = $jti->getDirtyAttributes($attributes);
73 73
         $jtisParameters = [];
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 ->where('id = :id', [':id' => $values[$modelKey]])
122 122
                 ->one($this->db);
123 123
             if ($entity !== false) {
124
-                throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"');
124
+                throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"');
125 125
             }
126 126
         }
127 127
         $jtiKey = isset($values[$modelKey]) ? $values[$modelKey] : $jti->getKey();
Please login to merge, or discard this patch.
src/controllers/AuthorizeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
                     } else {
234 234
                         Yii::$app->session->setFlash('error', [
235 235
                             'error' => 'invalid_scope',
236
-                            'error_description' => 'Scope ' . $scope . ' does not exist.',
236
+                            'error_description' => 'Scope '.$scope.' does not exist.',
237 237
                         ], false);
238 238
                         return $this->redirect(['error']);
239 239
                     }
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     /**
193 193
      * @var int duration of login time for multiple authorize calls
194 194
      */
195
-    public $loginDuration = 60 * 60 * 24 * 30;
195
+    public $loginDuration = 60*60*24*30;
196 196
 
197 197
     /**
198 198
      * @var bool configure authorization code (enforce_redirect)
@@ -273,19 +273,19 @@  discard block
 block discarded – undo
273 273
         }
274 274
         $this->setUpDi($app);
275 275
         if (empty($this->baseEndPoint) === false) {
276
-            $this->baseEndPoint = trim($this->baseEndPoint, '/') . '/';
276
+            $this->baseEndPoint = trim($this->baseEndPoint, '/').'/';
277 277
         }
278 278
 
279 279
         if ($app instanceof ConsoleApplication) {
280 280
             $this->mapConsoleControllers($app);
281 281
         } else {
282 282
             $app->getUrlManager()->addRules([
283
-                ['verb' => 'POST', 'pattern' => $this->baseEndPoint . 'token', 'route' => $this->id . '/token/index'],
284
-                ['verb' => 'OPTIONS', 'pattern' => $this->baseEndPoint . 'token', 'route' => $this->id . '/token/options'],
285
-                ['verb' => 'GET', 'pattern' => $this->baseEndPoint . 'authorize', 'route' => $this->id . '/authorize/index'],
286
-                ['pattern' => $this->baseEndPoint . 'authorize-login', 'route' => $this->id . '/authorize/login'],
287
-                ['pattern' => $this->baseEndPoint . 'authorize-application', 'route' => $this->id . '/authorize/authorize'],
288
-                ['pattern' => $this->baseEndPoint . 'authorize-error', 'route' => $this->id . '/authorize/error'],
283
+                ['verb' => 'POST', 'pattern' => $this->baseEndPoint.'token', 'route' => $this->id.'/token/index'],
284
+                ['verb' => 'OPTIONS', 'pattern' => $this->baseEndPoint.'token', 'route' => $this->id.'/token/options'],
285
+                ['verb' => 'GET', 'pattern' => $this->baseEndPoint.'authorize', 'route' => $this->id.'/authorize/index'],
286
+                ['pattern' => $this->baseEndPoint.'authorize-login', 'route' => $this->id.'/authorize/login'],
287
+                ['pattern' => $this->baseEndPoint.'authorize-application', 'route' => $this->id.'/authorize/authorize'],
288
+                ['pattern' => $this->baseEndPoint.'authorize-error', 'route' => $this->id.'/authorize/error'],
289 289
             ]);
290 290
         }
291 291
     }
Please login to merge, or discard this patch.
src/services/redis/JtiService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function getJtiKey($jid)
55 55
     {
56
-        return $this->namespace . ':' . $jid;
56
+        return $this->namespace.':'.$jid;
57 57
     }
58 58
 
59 59
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function getSubjectJtisKey($sid)
64 64
     {
65
-        return $this->subjectNamespace . ':' . $sid . ':jtis';
65
+        return $this->subjectNamespace.':'.$sid.':jtis';
66 66
     }
67 67
 
68 68
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     protected function getClientJtisKey($cid)
73 73
     {
74
-        return $this->clientNamespace . ':' . $cid . ':jtis';
74
+        return $this->clientNamespace.':'.$cid.':jtis';
75 75
     }
76 76
 
77 77
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     protected function getJtiListKey()
81 81
     {
82
-        return $this->namespace . ':keys';
82
+        return $this->namespace.':keys';
83 83
     }
84 84
 
85 85
     /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function getSubjectListKey()
89 89
     {
90
-        return $this->subjectNamespace . ':keys';
90
+        return $this->subjectNamespace.':keys';
91 91
     }
92 92
 
93 93
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         //check if record exists
134 134
         $entityStatus = (int)$this->db->executeCommand('EXISTS', [$jtiKey]);
135 135
         if ($entityStatus === 1) {
136
-            throw new DuplicateKeyException('Duplicate key "' . $jtiKey . '"');
136
+            throw new DuplicateKeyException('Duplicate key "'.$jtiKey.'"');
137 137
         }
138 138
 
139 139
         $values = $jti->getDirtyAttributes($attributes);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             $newJtiKey = $this->getJtiKey($values[$modelKey]);
214 214
             $entityStatus = (int)$this->db->executeCommand('EXISTS', [$newJtiKey]);
215 215
             if ($entityStatus === 1) {
216
-                throw new DuplicateKeyException('Duplicate key "' . $newJtiKey . '"');
216
+                throw new DuplicateKeyException('Duplicate key "'.$newJtiKey.'"');
217 217
             }
218 218
         }
219 219
 
Please login to merge, or discard this patch.
src/services/redis/AccessTokenService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     protected function getAccessTokenKey($aid)
57 57
     {
58
-        return $this->namespace . ':' . $aid;
58
+        return $this->namespace.':'.$aid;
59 59
     }
60 60
 
61 61
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function getUserAccessTokensKey($uid)
67 67
     {
68
-        return $this->userNamespace . ':' . $uid . ':accessTokens';
68
+        return $this->userNamespace.':'.$uid.':accessTokens';
69 69
     }
70 70
 
71 71
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function getClientAccessTokensKey($cid)
77 77
     {
78
-        return $this->clientNamespace . ':' . $cid . ':accessTokens';
78
+        return $this->clientNamespace.':'.$cid.':accessTokens';
79 79
     }
80 80
 
81 81
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function getAccessTokenListKey()
85 85
     {
86
-        return $this->namespace . ':keys';
86
+        return $this->namespace.':keys';
87 87
     }
88 88
 
89 89
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function getUserListKey()
93 93
     {
94
-        return $this->userNamespace . ':keys';
94
+        return $this->userNamespace.':keys';
95 95
     }
96 96
 
97 97
     /**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         //check if record exists
138 138
         $entityStatus = (int)$this->db->executeCommand('EXISTS', [$accessTokenKey]);
139 139
         if ($entityStatus === 1) {
140
-            throw new DuplicateKeyException('Duplicate key "' . $accessTokenKey . '"');
140
+            throw new DuplicateKeyException('Duplicate key "'.$accessTokenKey.'"');
141 141
         }
142 142
 
143 143
         $values = $accessToken->getDirtyAttributes($attributes);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             $newAccessTokenKey = $this->getAccessTokenKey($values[$modelKey]);
218 218
             $entityStatus = (int)$this->db->executeCommand('EXISTS', [$newAccessTokenKey]);
219 219
             if ($entityStatus === 1) {
220
-                throw new DuplicateKeyException('Duplicate key "' . $newAccessTokenKey . '"');
220
+                throw new DuplicateKeyException('Duplicate key "'.$newAccessTokenKey.'"');
221 221
             }
222 222
         }
223 223
 
Please login to merge, or discard this patch.