| @@ -21,10 +21,10 @@ discard block | ||
| 21 | 21 |  $languages = explode(',', getenv('APP_LANGUAGES')); | 
| 22 | 22 | |
| 23 | 23 | // prepare asset bundle config | 
| 24 | -$bundles = []; | |
| 24 | +$bundles = [ ]; | |
| 25 | 25 |  if (getenv('APP_ASSET_USE_BUNDLED')) { | 
| 26 | 26 | // include generated asset-bundle configuration | 
| 27 | -    $bundles = include Yii::getAlias('@web/bundles') . '/config.php'; | |
| 27 | +    $bundles = include Yii::getAlias('@web/bundles').'/config.php'; | |
| 28 | 28 | // disable loading of bundles skin file, when using bundled assets | 
| 29 | 29 | Yii::$container->set( | 
| 30 | 30 | AdminLteAsset::className(), | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | return [ | 
| 41 | 41 | 'id' => 'app', | 
| 42 | 42 |      'name' => getenv('APP_TITLE'), | 
| 43 | - 'language' => $languages[0], | |
| 43 | + 'language' => $languages[ 0 ], | |
| 44 | 44 | 'basePath' => '@app', | 
| 45 | 45 | 'vendorPath' => '@root/vendor', | 
| 46 | 46 | 'runtimePath' => '@root/runtime', | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | ], | 
| 59 | 59 | 'params' => [ | 
| 60 | 60 |          'adminEmail' => getenv('APP_ADMIN_EMAIL'), | 
| 61 | - 'context.menuItems' => [], | |
| 61 | + 'context.menuItems' => [ ], | |
| 62 | 62 |          'backend.iframe.name' => getenv('APP_PARAMS_BACKEND_IFRAME_NAME') ?: '_self', | 
| 63 | 63 | 'backend.browserSupport' => [ | 
| 64 | 64 | 'Chrome' => 72, | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | 'container' => [ | 
| 75 | 75 | 'definitions' => [ | 
| 76 | 76 | AuthDbManagerComponent::class => [ | 
| 77 | - 'defaultRoles' => ['Default'], | |
| 77 | + 'defaultRoles' => [ 'Default' ], | |
| 78 | 78 | 'cache' => 'cache' | 
| 79 | 79 | ], | 
| 80 | 80 | Da\User\Controller\AdminController::class => [ | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 |              'key' => getenv('AMAZON_S3_BUCKET_PUBLIC_KEY'), | 
| 125 | 125 |              'secret' => getenv('AMAZON_S3_BUCKET_SECRET_KEY'), | 
| 126 | 126 |              'bucket' => getenv('AMAZON_S3_BUCKET_NAME'), | 
| 127 | -            'prefix' => getenv('APP_NAME') . '/public', | |
| 127 | +            'prefix' => getenv('APP_NAME').'/public', | |
| 128 | 128 |              'region' => getenv('AMAZON_S3_BUCKET_REGION'), | 
| 129 | 129 | ], | 
| 130 | 130 | 'fsRuntime' => [ | 
| @@ -150,8 +150,8 @@ discard block | ||
| 150 | 150 | 'common' => [ | 
| 151 | 151 | 'class' => \codemix\streamlog\Target::class, | 
| 152 | 152 | 'url' => 'php://stderr', | 
| 153 | - 'levels' => ['error', 'warning'], | |
| 154 | - 'logVars' => [], | |
| 153 | + 'levels' => [ 'error', 'warning' ], | |
| 154 | + 'logVars' => [ ], | |
| 155 | 155 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', | 
| 156 | 156 | ], | 
| 157 | 157 | ], | 
| @@ -172,7 +172,7 @@ discard block | ||
| 172 | 172 | 'messageConfig' => [ | 
| 173 | 173 | 'charset' => 'UTF-8', | 
| 174 | 174 |                  'returnPath' => getenv('APP_MAILER_RETURN_PATH'), | 
| 175 | -                'from' => [getenv('APP_MAILER_FROM') => getenv('APP_TITLE')], | |
| 175 | +                'from' => [ getenv('APP_MAILER_FROM') => getenv('APP_TITLE') ], | |
| 176 | 176 | ], | 
| 177 | 177 | ], | 
| 178 | 178 | 'queue' => [ | 
| @@ -195,9 +195,9 @@ discard block | ||
| 195 | 195 | 'user' => [ | 
| 196 | 196 | 'class' => \dmstr\web\User::class, | 
| 197 | 197 | 'enableAutoLogin' => true, | 
| 198 | - 'loginUrl' => ['/user/security/login'], | |
| 198 | + 'loginUrl' => [ '/user/security/login' ], | |
| 199 | 199 | 'identityClass' => Da\User\Model\User::class, | 
| 200 | - 'rootUsers' => ['admin'], | |
| 200 | + 'rootUsers' => [ 'admin' ], | |
| 201 | 201 | ], | 
| 202 | 202 | 'urlManager' => [ | 
| 203 | 203 | 'class' => \codemix\localeurls\UrlManager::class, | 
| @@ -228,37 +228,37 @@ discard block | ||
| 228 | 228 | 'auto_reload' => true, | 
| 229 | 229 | ], | 
| 230 | 230 | 'globals' => [ | 
| 231 | - 'Html' => ['class' => \yii\helpers\Html::class], | |
| 232 | - 'Json' => ['class' => \yii\helpers\Json::class], | |
| 233 | - 'Tree' => ['class' => \dmstr\modules\pages\models\Tree::class], | |
| 234 | - 'FA' => ['class' => \rmrevin\yii\fontawesome\FA::class], | |
| 235 | - 'FileUrl' => ['class' => \hrzg\filemanager\helpers\Url::class], | |
| 236 | - 'Url' => ['class' => \yii\helpers\Url::class], | |
| 237 | - 'Markdown' => ['class' => \yii\helpers\Markdown::class], | |
| 231 | + 'Html' => [ 'class' => \yii\helpers\Html::class ], | |
| 232 | + 'Json' => [ 'class' => \yii\helpers\Json::class ], | |
| 233 | + 'Tree' => [ 'class' => \dmstr\modules\pages\models\Tree::class ], | |
| 234 | + 'FA' => [ 'class' => \rmrevin\yii\fontawesome\FA::class ], | |
| 235 | + 'FileUrl' => [ 'class' => \hrzg\filemanager\helpers\Url::class ], | |
| 236 | + 'Url' => [ 'class' => \yii\helpers\Url::class ], | |
| 237 | + 'Markdown' => [ 'class' => \yii\helpers\Markdown::class ], | |
| 238 | 238 | ], | 
| 239 | 239 | 'functions' => [ | 
| 240 | -                        'image' => function ($imageSource, $preset = null) { | |
| 240 | +                        'image' => function($imageSource, $preset = null) { | |
| 241 | 241 | // sanitize input | 
| 242 | 242 | $preset = trim($preset, "/"); | 
| 243 | 243 |                              $baseUrl = trim(Yii::$app->settings->get('imgBaseUrl', 'app.frontend'), "/"); | 
| 244 | 244 |                              $prefix = trim(Yii::$app->settings->get('imgHostPrefix', 'app.frontend'), "/"); | 
| 245 | -                            $imageSourceFull = $imageSource . Yii::$app->settings->get('imgHostSuffix', 'app.frontend'); | |
| 245 | +                            $imageSourceFull = $imageSource.Yii::$app->settings->get('imgHostSuffix', 'app.frontend'); | |
| 246 | 246 | |
| 247 | 247 | // build remote URL | 
| 248 | -                            $remoteUrl = implode('/', array_filter([$prefix, $imageSourceFull])); | |
| 248 | +                            $remoteUrl = implode('/', array_filter([ $prefix, $imageSourceFull ])); | |
| 249 | 249 | |
| 250 | 250 | // add HMAC sign key to preset when using imageproxy, see also https://github.com/willnorris/imageproxy#examples | 
| 251 | 251 |                              if (getenv('IMAGEPROXY_SIGNATURE_KEY')) { | 
| 252 | 252 |                                  $key = getenv('IMAGEPROXY_SIGNATURE_KEY'); | 
| 253 | - $preset .= ',s' . strtr( | |
| 253 | + $preset .= ',s'.strtr( | |
| 254 | 254 |                                      base64_encode(hash_hmac('sha256', $remoteUrl, $key, 1)), | 
| 255 | 255 | '/+', | 
| 256 | 256 | '_-' | 
| 257 | 257 | ); | 
| 258 | 258 | } | 
| 259 | -                            return implode('/', array_filter([$baseUrl,$preset,$remoteUrl])); | |
| 259 | +                            return implode('/', array_filter([ $baseUrl, $preset, $remoteUrl ])); | |
| 260 | 260 | }, | 
| 261 | -                        't' => function ($category, $message, $params = [], $language = null) { | |
| 261 | +                        't' => function($category, $message, $params = [ ], $language = null) { | |
| 262 | 262 | return Yii::t($category, $message, $params, $language); | 
| 263 | 263 | }, | 
| 264 | 264 | ], | 
| @@ -272,7 +272,7 @@ discard block | ||
| 272 | 272 | 'modules' => [ | 
| 273 | 273 | 'audit' => [ | 
| 274 | 274 | 'class' => \bedezign\yii2\audit\Audit::class, | 
| 275 | - 'accessRoles' => ['audit-module'], | |
| 275 | + 'accessRoles' => [ 'audit-module' ], | |
| 276 | 276 | 'layout' => $boxLayout, | 
| 277 | 277 | 'panels' => [ | 
| 278 | 278 | 'audit/trail' => [ | 
| @@ -356,12 +356,12 @@ discard block | ||
| 356 | 356 | [ | 
| 357 | 357 | 'connection' => 'db', | 
| 358 | 358 |                      'table' => '{{%hrzg_widget_template}}', | 
| 359 | - 'columns' => ['twig_template'] | |
| 359 | + 'columns' => [ 'twig_template' ] | |
| 360 | 360 | ], | 
| 361 | 361 | [ | 
| 362 | 362 | 'connection' => 'db', | 
| 363 | 363 |                      'table' => '{{%twig}}', | 
| 364 | - 'columns' => ['value'] | |
| 364 | + 'columns' => [ 'value' ] | |
| 365 | 365 | ] | 
| 366 | 366 | ], | 
| 367 | 367 | 'scanners' => [ | 
| @@ -370,15 +370,15 @@ discard block | ||
| 370 | 370 | ScannerJavaScriptFunction::class, | 
| 371 | 371 | ScannerDatabase::class | 
| 372 | 372 | ], | 
| 373 | - 'allowedIPs' => ['*'], | |
| 374 | - 'roles' => ['translate-module'], | |
| 373 | + 'allowedIPs' => [ '*' ], | |
| 374 | + 'roles' => [ 'translate-module' ], | |
| 375 | 375 | ], | 
| 376 | 376 | 'user' => [ | 
| 377 | 377 | 'class' => Da\User\Module::class, | 
| 378 | 378 | 'layout' => '@app/views/layouts/container', | 
| 379 | 379 | 'defaultRoute' => 'admin', | 
| 380 | 380 | 'administratorPermissionName' => 'user-module', | 
| 381 | - 'administrators' => ['admin'], | |
| 381 | + 'administrators' => [ 'admin' ], | |
| 382 | 382 | 'enableFlashMessages' => false, | 
| 383 | 383 |              'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), | 
| 384 | 384 | 'mailParams' => [ |