Completed
Pull Request — devel (#21)
by Philippe
52:25
created
src/controllers/AuthorizeController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $authController = $oauthServer->getAuthorizeController();
132 132
 
133 133
                 //TODO: check if the user should get logged out
134
-                if(in_array('none', $promptValues, true)) {
134
+                if (in_array('none', $promptValues, true)) {
135 135
                     $response = new OAuth2Response();
136 136
                     $response->setRedirect(
137 137
                         302,
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             }
197 197
         }
198 198
         if ($response === null) {
199
-            if(in_array('none', $promptValues, true)) {
199
+            if (in_array('none', $promptValues, true)) {
200 200
                 /** @var \Oauth2\Controller\AuthorizeController $authController */
201 201
                 $authController = $oauthServer->getAuthorizeController();
202 202
                 $oauthResponse = $oauthServer->getResponse();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             }
265 265
         } else {
266 266
             // perform regular authorization
267
-            if(in_array('none', $promptValues, true)) {
267
+            if (in_array('none', $promptValues, true)) {
268 268
                 $oauthResponse = $oauthServer->getResponse();
269 269
                 $oauthResponse->setRedirect(
270 270
                     302,
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                         $requestedScopes[] = $dbScope;
289 289
                     } else {
290 290
                         $response = new OAuth2Response();
291
-                        $response->setError(400, 'invalid_scope', 'Scope ' . $scope . ' does not exist.');
291
+                        $response->setError(400, 'invalid_scope', 'Scope '.$scope.' does not exist.');
292 292
 
293 293
                         $this->handleResponse($response);
294 294
                     }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 if ($accept !== null) {
304 304
                     // authorize
305 305
                     $oauthResponse = $oauthServer->handleAuthorizeRequest($oauthRequest, $oauthResponse, true, Yii::$app->user->id);
306
-                    if($client->hasUser(Yii::$app->user->id) === false) {
306
+                    if ($client->hasUser(Yii::$app->user->id) === false) {
307 307
                         $client->addUser(Yii::$app->user->id);
308 308
                     }
309 309
 
Please login to merge, or discard this patch.