@@ -59,7 +59,7 @@ |
||
59 | 59 | continue; |
60 | 60 | } |
61 | 61 | |
62 | - foreach ((array) $flash as $i => $message) { |
|
62 | + foreach ((array)$flash as $i => $message) { |
|
63 | 63 | echo \yii\bootstrap4\Alert::widget([ |
64 | 64 | 'body' => $message, |
65 | 65 | 'closeButton' => $this->closeButton, |
@@ -5,9 +5,9 @@ |
||
5 | 5 | $sampleRoot = dirname(__DIR__, 1); |
6 | 6 | $projectRoot = dirname(__DIR__, 2); |
7 | 7 | |
8 | -Yii::setAlias('@rhertogh/Yii2Oauth2Server', $projectRoot . '/src'); |
|
9 | -Yii::setAlias('@vendor', $projectRoot . '/vendor'); |
|
8 | +Yii::setAlias('@rhertogh/Yii2Oauth2Server', $projectRoot . '/src'); |
|
9 | +Yii::setAlias('@vendor', $projectRoot . '/vendor'); |
|
10 | 10 | |
11 | -Yii::setAlias('@sample', $sampleRoot); |
|
11 | +Yii::setAlias('@sample', $sampleRoot); |
|
12 | 12 | |
13 | 13 | Json::$prettyPrint = YII_DEBUG; |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | //public static $tableName = '<?= $tableName ?>'; |
66 | 66 | |
67 | 67 | <?php |
68 | -if(!empty($enum)){ |
|
68 | +if (!empty($enum)) { |
|
69 | 69 | ?> |
70 | 70 | /** |
71 | 71 | * ENUM field values |
72 | 72 | */ |
73 | 73 | <?php |
74 | - foreach($enum as $column_name => $column_data){ |
|
75 | - foreach ($column_data['values'] as $enum_value){ |
|
74 | + foreach ($enum as $column_name => $column_data) { |
|
75 | + foreach ($column_data['values'] as $enum_value) { |
|
76 | 76 | echo ' const ' . $enum_value['const_name'] . ' = \'' . $enum_value['value'] . '\';' . PHP_EOL; |
77 | 77 | } |
78 | 78 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | <?php endif; ?> |
172 | 172 | <?php foreach ($relations as $name => $relation): ?> |
173 | 173 | <?php |
174 | - $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $relation[1] . 'QueryInterface'; |
|
174 | + $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $relation[1] . 'QueryInterface'; |
|
175 | 175 | ?> |
176 | 176 | |
177 | 177 | /** |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | <?php if ($queryClassName): ?> |
197 | 197 | <?php |
198 | - $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $queryClassName . 'Interface'; |
|
198 | + $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $queryClassName . 'Interface'; |
|
199 | 199 | ?> |
200 | 200 | |
201 | 201 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | <?php endif; ?> |
210 | 210 | |
211 | 211 | <?php |
212 | - foreach($enum as $column_name => $column_data){ |
|
212 | + foreach ($enum as $column_name => $column_data) { |
|
213 | 213 | ?> |
214 | 214 | |
215 | 215 | /** |
@@ -233,8 +233,8 @@ discard block |
||
233 | 233 | { |
234 | 234 | return [ |
235 | 235 | <?php |
236 | - foreach($column_data['values'] as $k => $value){ |
|
237 | - echo ' '.'self::' . $value['const_name'] . ' => ' . $generator->generateString($value['label']) . ",\n"; |
|
236 | + foreach ($column_data['values'] as $k => $value) { |
|
237 | + echo ' ' . 'self::' . $value['const_name'] . ' => ' . $generator->generateString($value['label']) . ",\n"; |
|
238 | 238 | } |
239 | 239 | ?> |
240 | 240 | ]; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function generateRules($table) |
45 | 45 | { |
46 | - $rules = parent::generateRules($table); |
|
46 | + $rules = parent::generateRules($table); |
|
47 | 47 | |
48 | 48 | foreach ($rules as $key => $rule) { |
49 | 49 | foreach ($this->ignoreRules as $ignoreRule) { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | $user = $this->module->getUserRepository()->getUserEntityByIdentifier($oldRefreshToken['user_id']); |
45 | 45 | if (empty($user)) { |
46 | - throw new NotFoundHttpException( Yii::t('oauth2', 'Unable to find user with id "' . $oldRefreshToken['user_id'] . '".')); |
|
46 | + throw new NotFoundHttpException(Yii::t('oauth2', 'Unable to find user with id "' . $oldRefreshToken['user_id'] . '".')); |
|
47 | 47 | } |
48 | 48 | if (!($user instanceof Oauth2OidcUserSessionStatusInterface)) { |
49 | 49 | throw new InvalidConfigException('In order to support OpenId Connect Refresh Tokens without offline_access scope ' |
@@ -19,6 +19,6 @@ |
||
19 | 19 | */ |
20 | 20 | public function setExpiryDateTime(DateTimeImmutable $dateTime) |
21 | 21 | { |
22 | - $this->expiry_date_time =$dateTime; |
|
22 | + $this->expiry_date_time = $dateTime; |
|
23 | 23 | } |
24 | 24 | } |
@@ -14,14 +14,14 @@ |
||
14 | 14 | { |
15 | 15 | /** @var ActiveQuery $this */ |
16 | 16 | if (!is_null($enabled)) { |
17 | - if (is_null($this->from)){ |
|
17 | + if (is_null($this->from)) { |
|
18 | 18 | /** @var Oauth2ActiveRecordInterface $modelClass */ |
19 | 19 | $modelClass = $this->modelClass; |
20 | 20 | $table = $modelClass::tableName(); |
21 | 21 | } else { |
22 | 22 | $table = array_key_first($this->from); |
23 | 23 | } |
24 | - $this->andWhere([ "$table.enabled" => $enabled]); |
|
24 | + $this->andWhere(["$table.enabled" => $enabled]); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | return $this; |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $maxAge = $this->getRequestParam($request, OidcAuthRequestInterface::REQUEST_PARAMETER_MAX_AGE); |
116 | 116 | if ($maxAge === '') { |
117 | 117 | $maxAge = null; |
118 | - } elseif($maxAge !== null) { |
|
118 | + } elseif ($maxAge !== null) { |
|
119 | 119 | $maxAge = (int)$maxAge; |
120 | 120 | } |
121 | 121 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $response->data = $this->generateOpenIdConnectUserClaims($identity, $module, $nonce); |
58 | 58 | return $response; |
59 | 59 | |
60 | - } elseif($userInfoAlg == 'RS256') { |
|
60 | + } elseif ($userInfoAlg == 'RS256') { |
|
61 | 61 | |
62 | 62 | $response->format = Response::FORMAT_RAW; |
63 | 63 | $response->headers->add('Content-Type', 'application/jwt'); |