@@ -14,14 +14,14 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function __construct($connection = null, $config = array()) |
| 16 | 16 | { |
| 17 | - if($connection === null) { |
|
| 18 | - if($this->connection !== null && \Yii::$app->has($this->connection)) { |
|
| 17 | + if ($connection === null) { |
|
| 18 | + if ($this->connection !== null && \Yii::$app->has($this->connection)) { |
|
| 19 | 19 | $db = \Yii::$app->get($this->connection); |
| 20 | - if(!($db instanceof \yii\db\Connection)) { |
|
| 20 | + if (!($db instanceof \yii\db\Connection)) { |
|
| 21 | 21 | throw new \yii\base\InvalidConfigException('Connection component must implement \yii\db\Connection.'); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - if(!$db->getIsActive()) { |
|
| 24 | + if (!$db->getIsActive()) { |
|
| 25 | 25 | $db->open(); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'accessToken' => self::$token, |
| 108 | 108 | ]); |
| 109 | 109 | |
| 110 | - $I->seeResponseCodeIs(HttpCode::OK); |
|
| 110 | + $I->seeResponseCodeIs(HttpCode::OK); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | 'accessToken' => self::$scopeToken, |
| 133 | 133 | ]); |
| 134 | 134 | |
| 135 | - $I->seeResponseCodeIs(HttpCode::OK); |
|
| 135 | + $I->seeResponseCodeIs(HttpCode::OK); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | use _generated\UnitTesterActions; |
| 23 | 23 | |
| 24 | - /* |
|
| 24 | + /* |
|
| 25 | 25 | * Define custom actions here |
| 26 | 26 | */ |
| 27 | 27 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\ApiTesterActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | 'charset' => 'utf8', |
| 9 | 9 | ]; |
| 10 | 10 | |
| 11 | -if (file_exists(__DIR__.'/db.local.php')) { |
|
| 12 | - $db = array_merge($db, require(__DIR__.'/db.local.php')); |
|
| 11 | +if (file_exists(__DIR__ . '/db.local.php')) { |
|
| 12 | + $db = array_merge($db, require(__DIR__ . '/db.local.php')); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | return $db; |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | ], |
| 17 | 17 | 'components' => [ |
| 18 | 18 | 'assetManager' => [ |
| 19 | - 'basePath' => dirname(__DIR__) . '/assets', |
|
| 20 | - ], |
|
| 21 | - ], |
|
| 19 | + 'basePath' => dirname(__DIR__) . '/assets', |
|
| 20 | + ], |
|
| 21 | + ], |
|
| 22 | 22 | ] |
| 23 | 23 | ); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | 'components' => [ |
| 15 | 15 | 'db' => require __DIR__ . '/db.php', |
| 16 | 16 | 'authManager' => [ |
| 17 | - 'class' => yii\rbac\DbManager::class, |
|
| 17 | + 'class' => yii\rbac\DbManager::class, |
|
| 18 | 18 | ], |
| 19 | 19 | ], |
| 20 | 20 | ]; |
@@ -140,13 +140,13 @@ |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | $storages = []; |
| 143 | - foreach(array_keys($this->storageMap) as $name) { |
|
| 143 | + foreach (array_keys($this->storageMap) as $name) { |
|
| 144 | 144 | $storages[$name] = Yii::$container->get($name); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | $grantTypes = []; |
| 148 | - foreach($this->grantTypes as $name => $options) { |
|
| 149 | - if(!isset($storages[$name]) || empty($options['class'])) { |
|
| 148 | + foreach ($this->grantTypes as $name => $options) { |
|
| 149 | + if (!isset($storages[$name]) || empty($options['class'])) { |
|
| 150 | 150 | throw new InvalidConfigException( |
| 151 | 151 | 'Invalid grant types configuration.' |
| 152 | 152 | ); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var string the unique id for the oauth2 module |
| 17 | 17 | */ |
| 18 | - public string|Module $oauth2Module = 'oauth2'; |
|
| 18 | + public string | Module $oauth2Module = 'oauth2'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @inheritdoc |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | protected function ensureSuccessResponse(): void |
| 56 | 56 | { |
| 57 | 57 | $response = $this->oauth2Module->getResponse(); |
| 58 | - if($response === null |
|
| 58 | + if ($response === null |
|
| 59 | 59 | || $response->isInformational() |
| 60 | 60 | || $response->isSuccessful() |
| 61 | 61 | || $response->isRedirection() |