@@ -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 | |
@@ -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)) { |
@@ -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 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | protected function getRefreshTokenKey($rid) |
| 56 | 56 | { |
| 57 | - return $this->namespace . ':' . $rid; |
|
| 57 | + return $this->namespace.':'.$rid; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | protected function getUserRefreshTokensKey($uid) |
| 66 | 66 | { |
| 67 | - return $this->userNamespace . ':' . $uid . ':refreshTokens'; |
|
| 67 | + return $this->userNamespace.':'.$uid.':refreshTokens'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | protected function getClientRefreshTokensKey($cid) |
| 76 | 76 | { |
| 77 | - return $this->clientNamespace . ':' . $cid . ':refreshTokens'; |
|
| 77 | + return $this->clientNamespace.':'.$cid.':refreshTokens'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $userRefreshTokens = $this->db->executeCommand('SMEMBERS', [$userRefreshTokensKey]); |
| 290 | 290 | $refreshTokens = []; |
| 291 | 291 | if ((is_array($userRefreshTokens) === true) && (count($userRefreshTokens) > 0)) { |
| 292 | - foreach($userRefreshTokens as $userRefreshTokenId) { |
|
| 292 | + foreach ($userRefreshTokens as $userRefreshTokenId) { |
|
| 293 | 293 | $refreshTokens[] = $this->findOne($userRefreshTokenId); |
| 294 | 294 | } |
| 295 | 295 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | $clientRefreshTokens = $this->db->executeCommand('SMEMBERS', [$clientRefreshTokensKey]); |
| 306 | 306 | $refreshTokens = []; |
| 307 | 307 | if ((is_array($clientRefreshTokens) === true) && (count($clientRefreshTokens) > 0)) { |
| 308 | - foreach($clientRefreshTokens as $clientRefreshTokenId) { |
|
| 308 | + foreach ($clientRefreshTokens as $clientRefreshTokenId) { |
|
| 309 | 309 | $refreshTokens[] = $this->findOne($clientRefreshTokenId); |
| 310 | 310 | } |
| 311 | 311 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Returns the key value of the object |
| 121 | - * @return mixed|null |
|
| 121 | + * @return string |
|
| 122 | 122 | * @since 1.0.0 |
| 123 | 123 | */ |
| 124 | 124 | public function getKey() |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | 131 | * Returns the old key value of the object |
| 132 | - * @return mixed|null |
|
| 132 | + * @return string |
|
| 133 | 133 | * @since 1.0.0 |
| 134 | 134 | */ |
| 135 | 135 | public function getOldKey() |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use yii\base\InvalidArgumentException; |
| 19 | 19 | use yii\base\Model; |
| 20 | 20 | use yii\base\ModelEvent; |
| 21 | -use Yii; |
|
| 22 | 21 | use Exception; |
| 23 | 22 | use yii\base\NotSupportedException; |
| 24 | 23 | use yii\helpers\Inflector; |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if ($this->hasAttribute($name)) { |
| 172 | 172 | $this->_attributes[$name] = $value; |
| 173 | 173 | } else { |
| 174 | - throw new InvalidArgumentException(get_class($this) . ' has no attribute named "' . $name . '".'); |
|
| 174 | + throw new InvalidArgumentException(get_class($this).' has no attribute named "'.$name.'".'); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if (isset($this->_oldAttributes[$name]) || $this->hasAttribute($name)) { |
| 209 | 209 | $this->_oldAttributes[$name] = $value; |
| 210 | 210 | } else { |
| 211 | - throw new InvalidArgumentException(get_class($this) . ' has no attribute named "' . $name . '".'); |
|
| 211 | + throw new InvalidArgumentException(get_class($this).' has no attribute named "'.$name.'".'); |
|
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
@@ -382,10 +382,10 @@ discard block |
||
| 382 | 382 | * If not set, [[formName()]] will be used. |
| 383 | 383 | * @return boolean whether the model is successfully populated with some data. |
| 384 | 384 | */ |
| 385 | - public function loadIds($data, $formName=null) |
|
| 385 | + public function loadIds($data, $formName = null) |
|
| 386 | 386 | { |
| 387 | 387 | $camelData = []; |
| 388 | - foreach($data as $key => $value) { |
|
| 388 | + foreach ($data as $key => $value) { |
|
| 389 | 389 | $key = lcfirst(Inflector::id2camel($key)); |
| 390 | 390 | $camelData[$key] = $value; |
| 391 | 391 | } |
@@ -85,6 +85,7 @@ |
||
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * @param mixed $config |
| 88 | + * @param \yii\base\Module|null $module |
|
| 88 | 89 | * @return array Oauth server configuration |
| 89 | 90 | * @since 1.0.0 |
| 90 | 91 | */ |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function updateAttribute() |
| 58 | 58 | { |
| 59 | - foreach($this->attributes as $attribute) { |
|
| 59 | + foreach ($this->attributes as $attribute) { |
|
| 60 | 60 | if (empty($this->owner->{$attribute}) === true) { |
| 61 | 61 | $this->owner->{$attribute} = []; |
| 62 | 62 | } elseif (is_array($this->owner->{$attribute}) === false) { |
@@ -174,7 +174,7 @@ |
||
| 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 | } |