@@ -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; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | 'class' => yii\db\Connection::class, |
65 | 65 | 'dsn' => getenv('MYSQL_HOST') && getenv('MYSQL_DB_NAME') |
66 | 66 | ? 'mysql:host=' . getenv('MYSQL_HOST') . (getenv('MYSQL_PORT') ? ':' . getenv('MYSQL_PORT') : '') |
67 | - . ';dbname=' . getenv('MYSQL_DB_NAME') |
|
67 | + . ';dbname=' . getenv('MYSQL_DB_NAME') |
|
68 | 68 | : null, |
69 | 69 | 'username' => getenv('MYSQL_USER_NAME'), |
70 | 70 | 'password' => getenv('MYSQL_USER_PASSWORD'), |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | '2021-01-01' => getenv('YII2_OAUTH2_SERVER_STORAGE_ENCRYPTION_KEY'), // The encryption key for storage like client secrets |
38 | 38 | ], |
39 | 39 | 'defaultStorageEncryptionKey' => '2021-01-01', // The index of the default key in storageEncryptionKeys |
40 | - 'grantTypes' => [ // For more information which grant types to use, please see https://oauth2.thephpleague.com/authorization-server/which-grant/ |
|
40 | + 'grantTypes' => [// For more information which grant types to use, please see https://oauth2.thephpleague.com/authorization-server/which-grant/ |
|
41 | 41 | Oauth2Module::GRANT_TYPE_AUTH_CODE, |
42 | 42 | Oauth2Module::GRANT_TYPE_CLIENT_CREDENTIALS, |
43 | 43 | Oauth2Module::GRANT_TYPE_IMPLICIT, |
44 | 44 | Oauth2Module::GRANT_TYPE_PASSWORD, |
45 | 45 | Oauth2Module::GRANT_TYPE_REFRESH_TOKEN, |
46 | 46 | ], |
47 | - 'migrationsNamespace' => 'sample\\migrations\\oauth2', // The namespace with which migrations will be created (and by which they will be located). |
|
47 | + 'migrationsNamespace' => 'sample\\migrations\\oauth2', // The namespace with which migrations will be created (and by which they will be located). |
|
48 | 48 | 'enableOpenIdConnect' => true, // Only required if OpenID Connect support is required |
49 | 49 | 'defaultUserAccountSelection' => Oauth2Module::USER_ACCOUNT_SELECTION_UPON_CLIENT_REQUEST, // Allow clients to request user account selection (OpenID Connect) |
50 | 50 | 'migrationsFileOwnership' => '1000:1000', |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'file' => [ |
82 | 82 | 'class' => yii\log\FileTarget::class, |
83 | 83 | 'exportInterval' => 1, |
84 | - 'levels' => ['error', 'warning', 'info', 'trace',], |
|
84 | + 'levels' => ['error', 'warning', 'info', 'trace', ], |
|
85 | 85 | ], |
86 | 86 | ], |
87 | 87 | ], |
@@ -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) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function finalizeScopes( |
29 | 29 | array $scopes, |
30 | - $grantType, |
|
30 | + $grantType, |
|
31 | 31 | ClientEntityInterface $clientEntity, |
32 | 32 | $userIdentifier = null |
33 | 33 | ); |
@@ -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 | } |
@@ -22,8 +22,8 @@ |
||
22 | 22 | |
23 | 23 | |
24 | 24 | /** |
25 | - * @inheritdoc |
|
26 | - */ |
|
25 | + * @inheritdoc |
|
26 | + */ |
|
27 | 27 | //public static $tableName = 'oauth2_auth_code_scope'; |
28 | 28 | |
29 | 29 |