Completed
Push — devel ( 087546...d83316 )
by Philippe
02:55
created
src/controllers/TokenController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         }
175 175
 
176 176
         $headers = $oauthResponse->getHttpHeaders();
177
-        foreach($headers as $name => $value)
177
+        foreach ($headers as $name => $value)
178 178
         {
179 179
             $response->headers->set($name, $value);
180 180
         }
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
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
             $requestedScopes = [];
225 225
             if (empty($additionalScopes) === false) {
226 226
                 $additionalScopes = explode(' ', $additionalScopes);
227
-                foreach($additionalScopes as $scope) {
227
+                foreach ($additionalScopes as $scope) {
228 228
                     $dbScope = Scope::findOne($scope);
229 229
                     if ($dbScope !== null) {
230 230
                         $requestedScopes[] = $dbScope;
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
     /**
176 176
      * @var int duration of login time for multiple authorize calls
177 177
      */
178
-    public $loginDuration = 60 * 60 * 24 * 30;
178
+    public $loginDuration = 60*60*24*30;
179 179
 
180 180
     /**
181 181
      * @var false|array Cors configuration if allowed @see http://www.yiiframework.com/doc-2.0/yii-filters-cors.html
Please login to merge, or discard this patch.
src/views/authorize/authorize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
     <div class="row">
36 36
         <div class="col-md-push-3 col-md-6 col-sm-push-2 col-sm-8 col-xs-12 white-panel">
37 37
             <?php echo Html::beginForm(); ?>
38
-            <?php if(empty($requestedScopes) === false) : ?>
38
+            <?php if (empty($requestedScopes) === false) : ?>
39 39
             <ul class="list-group">
40
-                <?php foreach($requestedScopes as $scope): ?>
40
+                <?php foreach ($requestedScopes as $scope): ?>
41 41
                 <li class="list-group-item">
42 42
                     <h4 class="list-group-item-heading"><?php echo $scope->id; ?></h4>
43 43
                     <p class="list-group-item-text">
Please login to merge, or discard this patch.
src/services/redis/ClientService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     protected function getClientKey($cid)
53 53
     {
54
-        return $this->namespace . ':' . $cid;
54
+        return $this->namespace.':'.$cid;
55 55
     }
56 56
 
57 57
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function getClientUsersListKey($cid)
63 63
     {
64
-        return $this->namespace . ':' . $cid . ':users';
64
+        return $this->namespace.':'.$cid.':users';
65 65
     }
66 66
 
67 67
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     protected function getUserClientsListKey($uid)
73 73
     {
74
-        return $this->userNamespace . ':' . $uid . ':clients';
74
+        return $this->userNamespace.':'.$uid.':clients';
75 75
     }
76 76
 
77 77
     /**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
             $this->db->executeCommand('MULTI');
269 269
             // remove client from all userClient sets
270
-            foreach($usersList as $user) {
270
+            foreach ($usersList as $user) {
271 271
                 $userClientKey = $this->getUserClientsListKey($user);
272 272
                 $this->db->executeCommand('SREM', [$userClientKey, $id]);
273 273
             }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $userClientsListKey = $this->getUserClientsListKey($userId);
333 333
         $clientsList = $this->db->executeCommand('SMEMBERS', [$userClientsListKey]);
334 334
         $clients = [];
335
-        foreach($clientsList as $clientId) {
335
+        foreach ($clientsList as $clientId) {
336 336
             $result = $this->findOne($clientId);
337 337
             if ($result instanceof ClientModelInterface) {
338 338
                 $clients[] = $result;
Please login to merge, or discard this patch.
src/commands/ClientController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
         $client->grantTypes = empty($this->grantTypes) ? null : explode(',', $this->grantTypes);
77 77
         if ($client->save() === true) {
78 78
             $this->stdout('Client created :'."\n");
79
-            $this->stdout(' - id: ' . $client->id . "\n");
80
-            $this->stdout(' - secret: ' . $client->secret . "\n");
81
-            $this->stdout(' - name: ' . $client->name . "\n");
82
-            $this->stdout(' - redirectUri: ' . implode(',', $client->redirectUri) . "\n");
79
+            $this->stdout(' - id: '.$client->id."\n");
80
+            $this->stdout(' - secret: '.$client->secret."\n");
81
+            $this->stdout(' - name: '.$client->name."\n");
82
+            $this->stdout(' - redirectUri: '.implode(',', $client->redirectUri)."\n");
83 83
             return Controller::EXIT_CODE_NORMAL;
84 84
         } else {
85 85
             $this->stdout('Client cannot be created.'."\n");
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
             $client->scopes = empty($this->scope) ? null : explode(',', $this->scopes);
99 99
             $client->grantTypes = empty($this->grantTypes) ? null : explode(',', $this->grantTypes);
100 100
             if ($client->save() === true) {
101
-                $this->stdout('Client updated :' . "\n");
102
-                $this->stdout(' - id: ' . $client->id . "\n");
103
-                $this->stdout(' - secret: ' . $client->secret . "\n");
104
-                $this->stdout(' - name: ' . $client->name . "\n");
105
-                $this->stdout(' - redirectUri: ' . implode(',', $client->redirectUri) . "\n");
101
+                $this->stdout('Client updated :'."\n");
102
+                $this->stdout(' - id: '.$client->id."\n");
103
+                $this->stdout(' - secret: '.$client->secret."\n");
104
+                $this->stdout(' - name: '.$client->name."\n");
105
+                $this->stdout(' - redirectUri: '.implode(',', $client->redirectUri)."\n");
106 106
                 return Controller::EXIT_CODE_NORMAL;
107 107
             } else {
108 108
                 $this->stdout('Client cannot be updated.'."\n");
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function getRandomString($length = 40)
124 124
     {
125
-        $bytes = (int) $length/2;
125
+        $bytes = (int)$length/2;
126 126
         return bin2hex(openssl_random_pseudo_bytes($bytes));
127 127
     }
128 128
 }
Please login to merge, or discard this patch.