@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | |
12 | 12 | // Settings for web-application only |
13 | 13 | return [ |
14 | - 'on registerMenuItems' => function ($event) { |
|
15 | - Yii::$app->params['context.menuItems'] = \yii\helpers\ArrayHelper::merge( |
|
16 | - Yii::$app->params['context.menuItems'], |
|
14 | + 'on registerMenuItems' => function($event) { |
|
15 | + Yii::$app->params[ 'context.menuItems' ] = \yii\helpers\ArrayHelper::merge( |
|
16 | + Yii::$app->params[ 'context.menuItems' ], |
|
17 | 17 | $event->sender->getMenuItems() |
18 | 18 | ); |
19 | 19 | $event->handled = true; |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | 'web' => [ |
30 | 30 | 'class' => 'codemix\streamlog\Target', |
31 | 31 | 'url' => 'php://stdout', |
32 | - 'levels' => ['info', 'trace'], |
|
33 | - 'logVars' => [], |
|
32 | + 'levels' => [ 'info', 'trace' ], |
|
33 | + 'logVars' => [ ], |
|
34 | 34 | 'replaceNewline' => YII_DEBUG ? null : '', |
35 | 35 | 'enabled' => YII_DEBUG && !YII_ENV_TEST, |
36 | 36 | ], |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'settings' => [ |
51 | 51 | 'class' => 'pheme\settings\Module', |
52 | 52 | 'layout' => '@backend/views/layouts/box', |
53 | - 'accessRoles' => ['settings-module'], |
|
53 | + 'accessRoles' => [ 'settings-module' ], |
|
54 | 54 | ], |
55 | 55 | ], |
56 | 56 | ]; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $languages = explode(',', getenv('APP_LANGUAGES')); |
18 | 18 | |
19 | 19 | // prepare asset bundle config |
20 | -$bundles = []; |
|
20 | +$bundles = [ ]; |
|
21 | 21 | if (getenv('APP_ASSET_USE_BUNDLED')) { |
22 | 22 | // include generated asset-bundle configuration |
23 | 23 | $bundles = include Yii::getAlias('@web/bundles').'/config.php'; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return [ |
49 | 49 | 'id' => 'app', |
50 | 50 | 'name' => getenv('APP_TITLE'), |
51 | - 'language' => $languages[0], |
|
51 | + 'language' => $languages[ 0 ], |
|
52 | 52 | 'basePath' => realpath(__DIR__.'/..'), |
53 | 53 | 'vendorPath' => '@app/../vendor', |
54 | 54 | 'runtimePath' => '@app/../runtime', |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ], |
66 | 66 | 'params' => [ |
67 | 67 | 'adminEmail' => getenv('APP_ADMIN_EMAIL'), |
68 | - 'context.menuItems' => [], |
|
68 | + 'context.menuItems' => [ ], |
|
69 | 69 | 'yii.migrations' => ArrayHelper::merge( |
70 | 70 | explode(',', getenv('APP_MIGRATION_LOOKUP')), |
71 | 71 | [ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ], |
93 | 93 | 'authManager' => [ |
94 | 94 | 'class' => 'dektrium\rbac\components\DbManager', |
95 | - 'defaultRoles' => ['Default'], |
|
95 | + 'defaultRoles' => [ 'Default' ], |
|
96 | 96 | ], |
97 | 97 | 'cache' => getenv('APP_NO_CACHE') ? null : [ |
98 | 98 | 'class' => 'yii\redis\Cache', |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | 'common' => [ |
141 | 141 | 'class' => 'codemix\streamlog\Target', |
142 | 142 | 'url' => 'php://stderr', |
143 | - 'levels' => ['error', 'warning'], |
|
144 | - 'logVars' => [], |
|
143 | + 'levels' => [ 'error', 'warning' ], |
|
144 | + 'logVars' => [ ], |
|
145 | 145 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', |
146 | 146 | ], |
147 | 147 | ], |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | 'user' => [ |
172 | 172 | 'class' => 'dmstr\web\User', |
173 | 173 | 'enableAutoLogin' => true, |
174 | - 'loginUrl' => ['/user/security/login'], |
|
174 | + 'loginUrl' => [ '/user/security/login' ], |
|
175 | 175 | 'identityClass' => 'dektrium\user\models\User', |
176 | - 'rootUsers' => ['admin'], |
|
176 | + 'rootUsers' => [ 'admin' ], |
|
177 | 177 | ], |
178 | 178 | 'urlManager' => [ |
179 | 179 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -204,15 +204,15 @@ discard block |
||
204 | 204 | 'auto_reload' => true, |
205 | 205 | ], |
206 | 206 | 'globals' => [ |
207 | - 'Html' => ['class' => '\yii\helpers\Html'], |
|
208 | - 'Json' => ['class' => '\yii\helpers\Json'], |
|
209 | - 'Tree' => ['class' => '\dmstr\modules\pages\models\Tree'], |
|
210 | - 'FA' => ['class' => '\rmrevin\yii\fontawesome\FA'], |
|
211 | - 'FileUrl' => ['class' => '\hrzg\filemanager\helpers\Url'], |
|
212 | - 'Url' => ['class' => '\yii\helpers\Url'], |
|
207 | + 'Html' => [ 'class' => '\yii\helpers\Html' ], |
|
208 | + 'Json' => [ 'class' => '\yii\helpers\Json' ], |
|
209 | + 'Tree' => [ 'class' => '\dmstr\modules\pages\models\Tree' ], |
|
210 | + 'FA' => [ 'class' => '\rmrevin\yii\fontawesome\FA' ], |
|
211 | + 'FileUrl' => [ 'class' => '\hrzg\filemanager\helpers\Url' ], |
|
212 | + 'Url' => [ 'class' => '\yii\helpers\Url' ], |
|
213 | 213 | ], |
214 | 214 | 'functions' => [ |
215 | - 'image' => function ($imageSource, $preset = null) { |
|
215 | + 'image' => function($imageSource, $preset = null) { |
|
216 | 216 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples |
217 | 217 | return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). |
218 | 218 | $preset. |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | 'modules' => [ |
232 | 232 | 'audit' => [ |
233 | 233 | 'class' => 'bedezign\yii2\audit\Audit', |
234 | - 'accessRoles' => ['audit-module'], |
|
234 | + 'accessRoles' => [ 'audit-module' ], |
|
235 | 235 | 'layout' => '@backend/views/layouts/box', |
236 | 236 | 'panels' => [ |
237 | 237 | 'audit/request', |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | 'audit/trail', |
240 | 240 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
241 | 241 | // These provide special functionality and get loaded to activate it |
242 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
243 | - 'audit/extra', // Links the data functions (`data()`) |
|
244 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
242 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
243 | + 'audit/extra', // Links the data functions (`data()`) |
|
244 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
245 | 245 | //'audit/db', |
246 | 246 | //'audit/log', |
247 | 247 | //'audit/profiling', |
@@ -306,15 +306,15 @@ discard block |
||
306 | 306 | 'class' => 'lajax\translatemanager\Module', |
307 | 307 | 'root' => '@app/views', |
308 | 308 | 'layout' => '@backend/views/layouts/box', |
309 | - 'allowedIPs' => ['*'], |
|
310 | - 'roles' => ['translate-module'], |
|
309 | + 'allowedIPs' => [ '*' ], |
|
310 | + 'roles' => [ 'translate-module' ], |
|
311 | 311 | ], |
312 | 312 | 'user' => [ |
313 | 313 | 'class' => 'dektrium\user\Module', |
314 | 314 | 'layout' => '@app/views/layouts/container', |
315 | 315 | 'defaultRoute' => 'admin', |
316 | 316 | 'adminPermission' => 'user-module', |
317 | - 'admins' => ['admin'], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
317 | + 'admins' => [ 'admin' ], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
318 | 318 | 'enableFlashMessages' => false, |
319 | 319 | 'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), |
320 | 320 | ], |