@@ -17,10 +17,10 @@ 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 | -    $bundles = include Yii::getAlias('@web/bundles') . '/config.php'; | 
                                                        |
| 23 | +    $bundles = include Yii::getAlias('@web/bundles').'/config.php'; | 
                                                        |
| 24 | 24 | // disable loading of bundles skin file, when using bundled assets  | 
                                                        
| 25 | 25 | Yii::$container->set(  | 
                                                        
| 26 | 26 | AdminLteAsset::className(),  | 
                                                        
@@ -32,7 +32,7 @@ discard block  | 
                                                    ||
| 32 | 32 | |
| 33 | 33 | // set redis connection  | 
                                                        
| 34 | 34 | \Resque::setBackend(  | 
                                                        
| 35 | -    getenv('REDIS_PORT_6379_TCP_ADDR') . ':' . | 
                                                        |
| 35 | +    getenv('REDIS_PORT_6379_TCP_ADDR').':'. | 
                                                        |
| 36 | 36 |      getenv('REDIS_PORT_6379_TCP_PORT') | 
                                                        
| 37 | 37 | );  | 
                                                        
| 38 | 38 | |
@@ -48,8 +48,8 @@ discard block  | 
                                                    ||
| 48 | 48 | return [  | 
                                                        
| 49 | 49 | 'id' => 'app',  | 
                                                        
| 50 | 50 |      'name' => getenv('APP_TITLE'), | 
                                                        
| 51 | - 'language' => $languages[0],  | 
                                                        |
| 52 | - 'basePath' => realpath(__DIR__ . '/..'),  | 
                                                        |
| 51 | + 'language' => $languages[ 0 ],  | 
                                                        |
| 52 | + 'basePath' => realpath(__DIR__.'/..'),  | 
                                                        |
| 53 | 53 | 'vendorPath' => '@app/../vendor',  | 
                                                        
| 54 | 54 | 'runtimePath' => '@app/../runtime',  | 
                                                        
| 55 | 55 | // Bootstrapped modules are loaded in every request  | 
                                                        
@@ -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 | [  | 
                                                        
@@ -81,7 +81,7 @@ discard block  | 
                                                    ||
| 81 | 81 | '@dmstr/modules/publication/migrations'  | 
                                                        
| 82 | 82 | ]  | 
                                                        
| 83 | 83 | ),  | 
                                                        
| 84 | -        'backend.iframe.name' => 'backend-' . getenv('HOSTNAME'), | 
                                                        |
| 84 | +        'backend.iframe.name' => 'backend-'.getenv('HOSTNAME'), | 
                                                        |
| 85 | 85 | ],  | 
                                                        
| 86 | 86 | 'components' => [  | 
                                                        
| 87 | 87 | 'assetManager' => [  | 
                                                        
@@ -93,7 +93,7 @@ discard block  | 
                                                    ||
| 93 | 93 | ],  | 
                                                        
| 94 | 94 | 'authManager' => [  | 
                                                        
| 95 | 95 | 'class' => \dektrium\rbac\components\DbManager::class,  | 
                                                        
| 96 | - 'defaultRoles' => ['Default'],  | 
                                                        |
| 96 | + 'defaultRoles' => [ 'Default' ],  | 
                                                        |
| 97 | 97 | ],  | 
                                                        
| 98 | 98 |          'cache' => getenv('APP_NO_CACHE') ? null : [ | 
                                                        
| 99 | 99 | 'class' => \yii\redis\Cache::class,  | 
                                                        
@@ -116,7 +116,7 @@ discard block  | 
                                                    ||
| 116 | 116 |              'key' => getenv('AMAZON_S3_BUCKET_PUBLIC_KEY'), | 
                                                        
| 117 | 117 |              'secret' => getenv('AMAZON_S3_BUCKET_SECRET_KEY'), | 
                                                        
| 118 | 118 |              'bucket' => getenv('AMAZON_S3_BUCKET_NAME'), | 
                                                        
| 119 | -            'prefix' => getenv('APP_NAME') . '/public', | 
                                                        |
| 119 | +            'prefix' => getenv('APP_NAME').'/public', | 
                                                        |
| 120 | 120 |              'region' => getenv('AMAZON_S3_BUCKET_REGION'), | 
                                                        
| 121 | 121 | ],  | 
                                                        
| 122 | 122 | 'fsRuntime' => [  | 
                                                        
@@ -141,8 +141,8 @@ discard block  | 
                                                    ||
| 141 | 141 | 'common' => [  | 
                                                        
| 142 | 142 | 'class' => \codemix\streamlog\Target::class,  | 
                                                        
| 143 | 143 | 'url' => 'php://stderr',  | 
                                                        
| 144 | - 'levels' => ['error', 'warning'],  | 
                                                        |
| 145 | - 'logVars' => [],  | 
                                                        |
| 144 | + 'levels' => [ 'error', 'warning' ],  | 
                                                        |
| 145 | + 'logVars' => [ ],  | 
                                                        |
| 146 | 146 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '',  | 
                                                        
| 147 | 147 | ],  | 
                                                        
| 148 | 148 | ],  | 
                                                        
@@ -172,9 +172,9 @@ discard block  | 
                                                    ||
| 172 | 172 | 'user' => [  | 
                                                        
| 173 | 173 | 'class' => \dmstr\web\User::class,  | 
                                                        
| 174 | 174 | 'enableAutoLogin' => true,  | 
                                                        
| 175 | - 'loginUrl' => ['/user/security/login'],  | 
                                                        |
| 175 | + 'loginUrl' => [ '/user/security/login' ],  | 
                                                        |
| 176 | 176 | 'identityClass' => \dektrium\user\models\User::class,  | 
                                                        
| 177 | - 'rootUsers' => ['admin'],  | 
                                                        |
| 177 | + 'rootUsers' => [ 'admin' ],  | 
                                                        |
| 178 | 178 | ],  | 
                                                        
| 179 | 179 | 'urlManager' => [  | 
                                                        
| 180 | 180 | 'class' => \codemix\localeurls\UrlManager::class,  | 
                                                        
@@ -205,20 +205,20 @@ discard block  | 
                                                    ||
| 205 | 205 | 'auto_reload' => true,  | 
                                                        
| 206 | 206 | ],  | 
                                                        
| 207 | 207 | 'globals' => [  | 
                                                        
| 208 | - 'Html' => ['class' => \yii\helpers\Html::class],  | 
                                                        |
| 209 | - 'Json' => ['class' => \yii\helpers\Json::class],  | 
                                                        |
| 210 | - 'Tree' => ['class' => \dmstr\modules\pages\models\Tree::class],  | 
                                                        |
| 211 | - 'FA' => ['class' => \rmrevin\yii\fontawesome\FA::class],  | 
                                                        |
| 212 | - 'FileUrl' => ['class' => \hrzg\filemanager\helpers\Url::class],  | 
                                                        |
| 213 | - 'Url' => ['class' => \yii\helpers\Url::class],  | 
                                                        |
| 208 | + 'Html' => [ 'class' => \yii\helpers\Html::class ],  | 
                                                        |
| 209 | + 'Json' => [ 'class' => \yii\helpers\Json::class ],  | 
                                                        |
| 210 | + 'Tree' => [ 'class' => \dmstr\modules\pages\models\Tree::class ],  | 
                                                        |
| 211 | + 'FA' => [ 'class' => \rmrevin\yii\fontawesome\FA::class ],  | 
                                                        |
| 212 | + 'FileUrl' => [ 'class' => \hrzg\filemanager\helpers\Url::class ],  | 
                                                        |
| 213 | + 'Url' => [ 'class' => \yii\helpers\Url::class ],  | 
                                                        |
| 214 | 214 | ],  | 
                                                        
| 215 | 215 | 'functions' => [  | 
                                                        
| 216 | -                        'image' => function ($imageSource, $preset = null) { | 
                                                        |
| 216 | +                        'image' => function($imageSource, $preset = null) { | 
                                                        |
| 217 | 217 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples  | 
                                                        
| 218 | -                            return Yii::$app->settings->get('imgBaseUrl', 'app.frontend') . | 
                                                        |
| 219 | - $preset .  | 
                                                        |
| 220 | -                                Yii::$app->settings->get('imgHostPrefix', 'app.frontend') . | 
                                                        |
| 221 | - $imageSource .  | 
                                                        |
| 218 | +                            return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). | 
                                                        |
| 219 | + $preset.  | 
                                                        |
| 220 | +                                Yii::$app->settings->get('imgHostPrefix', 'app.frontend'). | 
                                                        |
| 221 | + $imageSource.  | 
                                                        |
| 222 | 222 |                                  Yii::$app->settings->get('imgHostSuffix', 'app.frontend'); | 
                                                        
| 223 | 223 | },  | 
                                                        
| 224 | 224 | ],  | 
                                                        
@@ -232,7 +232,7 @@ discard block  | 
                                                    ||
| 232 | 232 | 'modules' => [  | 
                                                        
| 233 | 233 | 'audit' => [  | 
                                                        
| 234 | 234 | 'class' => \bedezign\yii2\audit\Audit::class,  | 
                                                        
| 235 | - 'accessRoles' => ['audit-module'],  | 
                                                        |
| 235 | + 'accessRoles' => [ 'audit-module' ],  | 
                                                        |
| 236 | 236 | 'layout' => '@backend/views/layouts/box',  | 
                                                        
| 237 | 237 | 'panels' => [  | 
                                                        
| 238 | 238 | 'audit/request',  | 
                                                        
@@ -240,9 +240,9 @@ discard block  | 
                                                    ||
| 240 | 240 | 'audit/trail',  | 
                                                        
| 241 | 241 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings  | 
                                                        
| 242 | 242 | // These provide special functionality and get loaded to activate it  | 
                                                        
| 243 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`)  | 
                                                        |
| 244 | - 'audit/extra', // Links the data functions (`data()`)  | 
                                                        |
| 245 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`)  | 
                                                        |
| 243 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`)  | 
                                                        |
| 244 | + 'audit/extra', // Links the data functions (`data()`)  | 
                                                        |
| 245 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`)  | 
                                                        |
| 246 | 246 | //'audit/db',  | 
                                                        
| 247 | 247 | //'audit/log',  | 
                                                        
| 248 | 248 | //'audit/profiling',  | 
                                                        
@@ -310,15 +310,15 @@ discard block  | 
                                                    ||
| 310 | 310 | 'class' => \lajax\translatemanager\Module::class,  | 
                                                        
| 311 | 311 | 'root' => '@app/views',  | 
                                                        
| 312 | 312 | 'layout' => '@backend/views/layouts/box',  | 
                                                        
| 313 | - 'allowedIPs' => ['*'],  | 
                                                        |
| 314 | - 'roles' => ['translate-module'],  | 
                                                        |
| 313 | + 'allowedIPs' => [ '*' ],  | 
                                                        |
| 314 | + 'roles' => [ 'translate-module' ],  | 
                                                        |
| 315 | 315 | ],  | 
                                                        
| 316 | 316 | 'user' => [  | 
                                                        
| 317 | 317 | 'class' => \dektrium\user\Module::class,  | 
                                                        
| 318 | 318 | 'layout' => '@app/views/layouts/container',  | 
                                                        
| 319 | 319 | 'defaultRoute' => 'admin',  | 
                                                        
| 320 | 320 | 'adminPermission' => 'user-module',  | 
                                                        
| 321 | - 'admins' => ['admin'], // TODO: see https://github.com/dektrium/yii2-user/issues/1016  | 
                                                        |
| 321 | + 'admins' => [ 'admin' ], // TODO: see https://github.com/dektrium/yii2-user/issues/1016  | 
                                                        |
| 322 | 322 | 'enableFlashMessages' => false,  | 
                                                        
| 323 | 323 |              'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), | 
                                                        
| 324 | 324 | ],  | 
                                                        
@@ -60,7 +60,7 @@  | 
                                                    ||
| 60 | 60 | 'class' => \yii\log\FileTarget::class,  | 
                                                        
| 61 | 61 | 'logFile' => '@runtime/logs/console.log',  | 
                                                        
| 62 | 62 | //'levels' => ['info', 'trace'],  | 
                                                        
| 63 | - 'logVars' => [],  | 
                                                        |
| 63 | + 'logVars' => [ ],  | 
                                                        |
| 64 | 64 | 'dirMode' => YII_ENV_DEV ? 0777 : null,  | 
                                                        
| 65 | 65 | 'fileMode' => YII_ENV_DEV ? 0666 : null,  | 
                                                        
| 66 | 66 | 'enabled' => YII_DEBUG && !YII_ENV_TEST,  |