@@ -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 | ], |
79 | 79 | Da\User\Controller\AdminController::class => [ |
80 | 80 | 'layout' => $boxLayout, |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ], |
103 | 103 | 'authManager' => [ |
104 | 104 | 'class' => \yii\rbac\DbManager::class, |
105 | - 'defaultRoles' => ['Default'], |
|
105 | + 'defaultRoles' => [ 'Default' ], |
|
106 | 106 | 'cache' => 'cache' |
107 | 107 | ], |
108 | 108 | 'cache' => |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'key' => getenv('AMAZON_S3_BUCKET_PUBLIC_KEY'), |
129 | 129 | 'secret' => getenv('AMAZON_S3_BUCKET_SECRET_KEY'), |
130 | 130 | 'bucket' => getenv('AMAZON_S3_BUCKET_NAME'), |
131 | - 'prefix' => getenv('APP_NAME') . '/public', |
|
131 | + 'prefix' => getenv('APP_NAME').'/public', |
|
132 | 132 | 'region' => getenv('AMAZON_S3_BUCKET_REGION'), |
133 | 133 | ], |
134 | 134 | 'fsRuntime' => [ |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | 'common' => [ |
155 | 155 | 'class' => \codemix\streamlog\Target::class, |
156 | 156 | 'url' => 'php://stderr', |
157 | - 'levels' => ['error', 'warning'], |
|
158 | - 'logVars' => [], |
|
157 | + 'levels' => [ 'error', 'warning' ], |
|
158 | + 'logVars' => [ ], |
|
159 | 159 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', |
160 | 160 | ], |
161 | 161 | ], |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | 'messageConfig' => [ |
177 | 177 | 'charset' => 'UTF-8', |
178 | 178 | 'returnPath' => getenv('APP_MAILER_RETURN_PATH'), |
179 | - 'from' => [getenv('APP_MAILER_FROM') => getenv('APP_TITLE')], |
|
179 | + 'from' => [ getenv('APP_MAILER_FROM') => getenv('APP_TITLE') ], |
|
180 | 180 | ], |
181 | 181 | ], |
182 | 182 | 'queue' => [ |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | 'user' => [ |
199 | 199 | 'class' => \dmstr\web\User::class, |
200 | 200 | 'enableAutoLogin' => true, |
201 | - 'loginUrl' => ['/user/security/login'], |
|
201 | + 'loginUrl' => [ '/user/security/login' ], |
|
202 | 202 | 'identityClass' => Da\User\Model\User::class, |
203 | - 'rootUsers' => ['admin'], |
|
203 | + 'rootUsers' => [ 'admin' ], |
|
204 | 204 | ], |
205 | 205 | 'urlManager' => [ |
206 | 206 | 'class' => \codemix\localeurls\UrlManager::class, |
@@ -231,16 +231,16 @@ discard block |
||
231 | 231 | 'auto_reload' => true, |
232 | 232 | ], |
233 | 233 | 'globals' => [ |
234 | - 'Html' => ['class' => \yii\helpers\Html::class], |
|
235 | - 'Json' => ['class' => \yii\helpers\Json::class], |
|
236 | - 'Tree' => ['class' => \dmstr\modules\pages\models\Tree::class], |
|
237 | - 'FA' => ['class' => \rmrevin\yii\fontawesome\FA::class], |
|
238 | - 'FileUrl' => ['class' => \hrzg\filemanager\helpers\Url::class], |
|
239 | - 'Url' => ['class' => \yii\helpers\Url::class], |
|
240 | - 'Markdown' => ['class' => \yii\helpers\Markdown::class], |
|
234 | + 'Html' => [ 'class' => \yii\helpers\Html::class ], |
|
235 | + 'Json' => [ 'class' => \yii\helpers\Json::class ], |
|
236 | + 'Tree' => [ 'class' => \dmstr\modules\pages\models\Tree::class ], |
|
237 | + 'FA' => [ 'class' => \rmrevin\yii\fontawesome\FA::class ], |
|
238 | + 'FileUrl' => [ 'class' => \hrzg\filemanager\helpers\Url::class ], |
|
239 | + 'Url' => [ 'class' => \yii\helpers\Url::class ], |
|
240 | + 'Markdown' => [ 'class' => \yii\helpers\Markdown::class ], |
|
241 | 241 | ], |
242 | 242 | 'functions' => [ |
243 | - 'image' => function ($imageSource, $preset = null) { |
|
243 | + 'image' => function($imageSource, $preset = null) { |
|
244 | 244 | // sanitize input |
245 | 245 | $preset = trim($preset, "/"); |
246 | 246 | $baseUrl = trim(Yii::$app->settings->get('imgBaseUrl', 'app.frontend'), "/"); |
@@ -252,15 +252,15 @@ discard block |
||
252 | 252 | // add HMAC sign key to preset when using imageproxy, see also https://github.com/willnorris/imageproxy#examples |
253 | 253 | if (getenv('IMAGEPROXY_SIGNATURE_KEY')) { |
254 | 254 | $key = getenv('IMAGEPROXY_SIGNATURE_KEY'); |
255 | - $preset .= ',s' . strtr( |
|
255 | + $preset .= ',s'.strtr( |
|
256 | 256 | base64_encode(hash_hmac('sha256', $remoteUrl, $key, 1)), |
257 | 257 | '/+', |
258 | 258 | '_-' |
259 | 259 | ); |
260 | 260 | } |
261 | - return implode('/', array_filter([$baseUrl,$preset,$remoteUrl])); |
|
261 | + return implode('/', array_filter([ $baseUrl, $preset, $remoteUrl ])); |
|
262 | 262 | }, |
263 | - 't' => function ($category, $message) { |
|
263 | + 't' => function($category, $message) { |
|
264 | 264 | return Yii::t($category, $message); |
265 | 265 | }, |
266 | 266 | ], |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | 'modules' => [ |
275 | 275 | 'audit' => [ |
276 | 276 | 'class' => \bedezign\yii2\audit\Audit::class, |
277 | - 'accessRoles' => ['audit-module'], |
|
277 | + 'accessRoles' => [ 'audit-module' ], |
|
278 | 278 | 'layout' => $boxLayout, |
279 | 279 | 'panels' => [ |
280 | 280 | 'audit/trail' => [ |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | [ |
359 | 359 | 'connection' => 'db', |
360 | 360 | 'table' => '{{%hrzg_widget_template}}', |
361 | - 'columns' => ['twig_template'] |
|
361 | + 'columns' => [ 'twig_template' ] |
|
362 | 362 | ], |
363 | 363 | [ |
364 | 364 | 'connection' => 'db', |
365 | 365 | 'table' => '{{%twig}}', |
366 | - 'columns' => ['value'] |
|
366 | + 'columns' => [ 'value' ] |
|
367 | 367 | ] |
368 | 368 | ], |
369 | 369 | 'scanners' => [ |
@@ -372,15 +372,15 @@ discard block |
||
372 | 372 | ScannerJavaScriptFunction::class, |
373 | 373 | ScannerDatabase::class |
374 | 374 | ], |
375 | - 'allowedIPs' => ['*'], |
|
376 | - 'roles' => ['translate-module'], |
|
375 | + 'allowedIPs' => [ '*' ], |
|
376 | + 'roles' => [ 'translate-module' ], |
|
377 | 377 | ], |
378 | 378 | 'user' => [ |
379 | 379 | 'class' => Da\User\Module::class, |
380 | 380 | 'layout' => '@app/views/layouts/container', |
381 | 381 | 'defaultRoute' => 'admin', |
382 | 382 | 'administratorPermissionName' => 'user-module', |
383 | - 'administrators' => ['admin'], |
|
383 | + 'administrators' => [ 'admin' ], |
|
384 | 384 | 'enableFlashMessages' => false, |
385 | 385 | 'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), |
386 | 386 | 'mailParams' => [ |