Completed
Push — devel ( 8e7291...5a91d2 )
by Philippe
06:50 queued 03:54
created
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.