@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function updateAttribute() |
53 | 53 | { |
54 | - foreach($this->attributes as $attribute) { |
|
54 | + foreach ($this->attributes as $attribute) { |
|
55 | 55 | if ($this->owner->{$attribute} === null) { |
56 | 56 | $this->owner->{$attribute} = []; |
57 | 57 | } |
@@ -32,8 +32,8 @@ |
||
32 | 32 | <div class="row"> |
33 | 33 | <div class="col-md-push-3 col-md-6 col-sm-push-2 col-sm-8 col-xs-12 white-panel"> |
34 | 34 | <div class="alert" role="alert"> |
35 | - <h4 class="alert-heading"><?php echo ($type ? : 'Unkown error'); ?></h4> |
|
36 | - <p><?php echo ($description ? : 'Please check your request'); ?></p> |
|
35 | + <h4 class="alert-heading"><?php echo ($type ?: 'Unkown error'); ?></h4> |
|
36 | + <p><?php echo ($description ?: 'Please check your request'); ?></p> |
|
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </div> |
@@ -27,7 +27,7 @@ |
||
27 | 27 | </head> |
28 | 28 | <body> |
29 | 29 | <?php $this->beginBody(); ?> |
30 | - <?php echo $content;?> |
|
30 | + <?php echo $content; ?> |
|
31 | 31 | <?php $this->endBody(); ?> |
32 | 32 | </body> |
33 | 33 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | protected function getClientKey($cid) |
47 | 47 | { |
48 | - return $this->namespace . ':' . $cid; |
|
48 | + return $this->namespace.':'.$cid; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function getClientUsersListKey($cid) |
57 | 57 | { |
58 | - return $this->namespace . ':' . $cid . ':users'; |
|
58 | + return $this->namespace.':'.$cid.':users'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -73,7 +73,7 @@ |
||
73 | 73 | if (is_array($data) === false) { |
74 | 74 | $data = explode(' ', $data); |
75 | 75 | } |
76 | - foreach($data as $redirectUri) { |
|
76 | + foreach ($data as $redirectUri) { |
|
77 | 77 | $isLocalhost = strncmp('http://localhost', $redirectUri, 16); |
78 | 78 | $isSecureLocalhost = strncmp('https://localhost', $redirectUri, 17); |
79 | 79 | if (($isLocalhost !== 0) && ($isSecureLocalhost !== 0)) { |
@@ -76,10 +76,10 @@ discard block |
||
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 |
||
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: ' . $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: '.$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 |
||
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 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function findAllByUserId($userId); |
56 | 56 | |
57 | 57 | /** |
58 | - * @param string $clientId |
|
58 | + * @param string $userId |
|
59 | 59 | * @return AccessTokenModelInterface[] |
60 | 60 | */ |
61 | 61 | public function findAllByClientId($userId); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function findAllByUserId($userId); |
56 | 56 | |
57 | 57 | /** |
58 | - * @param string $clientId |
|
58 | + * @param string $userId |
|
59 | 59 | * @return RefreshTokenModelInterface[] |
60 | 60 | */ |
61 | 61 | public function findAllByClientId($userId); |
@@ -55,7 +55,7 @@ discard block |
||
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 |
||
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 |
||
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 | /** |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $userAccessTokens = $this->db->executeCommand('SMEMBERS', [$userAccessTokensKey]); |
290 | 290 | $accessTokens = []; |
291 | 291 | if ((is_array($userAccessTokens) === true) && (count($userAccessTokens) > 0)) { |
292 | - foreach($userAccessTokens as $userAccessTokenId) { |
|
292 | + foreach ($userAccessTokens as $userAccessTokenId) { |
|
293 | 293 | $accessTokens[] = $this->findOne($userAccessTokenId); |
294 | 294 | } |
295 | 295 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $clientAccessTokens = $this->db->executeCommand('SMEMBERS', [$clientAccessTokensKey]); |
306 | 306 | $accessTokens = []; |
307 | 307 | if ((is_array($clientAccessTokens) === true) && (count($clientAccessTokens) > 0)) { |
308 | - foreach($clientAccessTokens as $clientAccessTokenId) { |
|
308 | + foreach ($clientAccessTokens as $clientAccessTokenId) { |
|
309 | 309 | $accessTokens[] = $this->findOne($clientAccessTokenId); |
310 | 310 | } |
311 | 311 | } |