@@ -13,13 +13,13 @@ discard block |
||
| 13 | 13 | $languages = explode(',', getenv('APP_LANGUAGES')); |
| 14 | 14 | |
| 15 | 15 | // prepare asset bundle config |
| 16 | -$bundles = []; |
|
| 16 | +$bundles = [ ]; |
|
| 17 | 17 | if (getenv('APP_ASSET_USE_BUNDLED')) { |
| 18 | 18 | $bundles = include Yii::getAlias('@web/bundles').'/config.php'; |
| 19 | 19 | } |
| 20 | 20 | if (getenv('APP_ASSET_DISABLE_BOOTSTRAP_BUNDLE')) { |
| 21 | - $bundles['yii\bootstrap\BootstrapAsset'] = [ |
|
| 22 | - 'css' => [], |
|
| 21 | + $bundles[ 'yii\bootstrap\BootstrapAsset' ] = [ |
|
| 22 | + 'css' => [ ], |
|
| 23 | 23 | ]; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // Basic configuration, used in web and console applications |
| 41 | 41 | return [ |
| 42 | 42 | 'id' => 'app', |
| 43 | - 'language' => $languages[0], |
|
| 43 | + 'language' => $languages[ 0 ], |
|
| 44 | 44 | 'basePath' => realpath(__DIR__.'/..'), |
| 45 | 45 | 'vendorPath' => '@app/../vendor', |
| 46 | 46 | 'runtimePath' => '@app/../runtime', |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ], |
| 55 | 55 | 'params' => [ |
| 56 | 56 | 'adminEmail' => getenv('APP_ADMIN_EMAIL'), |
| 57 | - 'context.menuItems' => [], |
|
| 57 | + 'context.menuItems' => [ ], |
|
| 58 | 58 | 'yii.migrations' => [ |
| 59 | 59 | getenv('APP_MIGRATION_LOOKUP'), |
| 60 | 60 | '@yii/rbac/migrations', |
@@ -72,8 +72,7 @@ discard block |
||
| 72 | 72 | 'dirMode' => 0775, |
| 73 | 73 | // Hashing for distributed systems |
| 74 | 74 | 'hashCallback' => YII_ENV_DEV ? |
| 75 | - null : |
|
| 76 | - function ($path) { |
|
| 75 | + null : function($path) { |
|
| 77 | 76 | return YII_ENV.'-'.substr(hash('sha256', $path), 0, 8).'-'.APP_VERSION.'-'.\Yii::$app->cache->get('prototype.less.changed_at'); |
| 78 | 77 | }, |
| 79 | 78 | // Note: You need to bundle asset with `yii asset` for development/debugging |
@@ -82,7 +81,7 @@ discard block |
||
| 82 | 81 | ], |
| 83 | 82 | 'authManager' => [ |
| 84 | 83 | 'class' => 'dektrium\rbac\components\DbManager', |
| 85 | - 'defaultRoles' => ['Default'], |
|
| 84 | + 'defaultRoles' => [ 'Default' ], |
|
| 86 | 85 | ], |
| 87 | 86 | 'cache' => [ |
| 88 | 87 | 'class' => 'yii\redis\Cache', |
@@ -126,8 +125,8 @@ discard block |
||
| 126 | 125 | [ |
| 127 | 126 | 'class' => 'codemix\streamlog\Target', |
| 128 | 127 | 'url' => 'php://stderr', |
| 129 | - 'levels' => ['error', 'warning'], |
|
| 130 | - 'logVars' => [], |
|
| 128 | + 'levels' => [ 'error', 'warning' ], |
|
| 129 | + 'logVars' => [ ], |
|
| 131 | 130 | ], |
| 132 | 131 | ], |
| 133 | 132 | ], |
@@ -156,9 +155,9 @@ discard block |
||
| 156 | 155 | 'user' => [ |
| 157 | 156 | 'class' => 'dmstr\web\User', |
| 158 | 157 | 'enableAutoLogin' => true, |
| 159 | - 'loginUrl' => ['/user/security/login'], |
|
| 158 | + 'loginUrl' => [ '/user/security/login' ], |
|
| 160 | 159 | 'identityClass' => 'dektrium\user\models\User', |
| 161 | - 'rootUsers' => ['admin'], |
|
| 160 | + 'rootUsers' => [ 'admin' ], |
|
| 162 | 161 | ], |
| 163 | 162 | 'urlManager' => [ |
| 164 | 163 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -166,7 +165,7 @@ discard block |
||
| 166 | 165 | 'showScriptName' => false, |
| 167 | 166 | 'enableDefaultLanguageUrlCode' => true, |
| 168 | 167 | 'baseUrl' => '/', |
| 169 | - 'rules' => [], |
|
| 168 | + 'rules' => [ ], |
|
| 170 | 169 | 'ignoreLanguageUrlPatterns' => [ |
| 171 | 170 | // route pattern => url pattern |
| 172 | 171 | '#^filefly/api#' => '#^filefly/api#', |
@@ -204,15 +203,15 @@ discard block |
||
| 204 | 203 | 'audit/trail', |
| 205 | 204 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
| 206 | 205 | // These provide special functionality and get loaded to activate it |
| 207 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 208 | - 'audit/extra', // Links the data functions (`data()`) |
|
| 209 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 206 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 207 | + 'audit/extra', // Links the data functions (`data()`) |
|
| 208 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 210 | 209 | //'audit/db', |
| 211 | 210 | //'audit/log', |
| 212 | 211 | //'audit/profiling', |
| 213 | 212 | ], |
| 214 | 213 | 'ignoreActions' => [ |
| 215 | - (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*':'_'), |
|
| 214 | + (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*' : '_'), |
|
| 216 | 215 | 'audit/*', |
| 217 | 216 | 'help/*', |
| 218 | 217 | 'gii/*', |
@@ -262,8 +261,8 @@ discard block |
||
| 262 | 261 | 'class' => 'lajax\translatemanager\Module', |
| 263 | 262 | 'root' => '@app/views', |
| 264 | 263 | 'layout' => '@backend/views/layouts/box', |
| 265 | - 'allowedIPs' => ['*'], |
|
| 266 | - 'roles' => ['translate-module'], |
|
| 264 | + 'allowedIPs' => [ '*' ], |
|
| 265 | + 'roles' => [ 'translate-module' ], |
|
| 267 | 266 | ], |
| 268 | 267 | 'user' => [ |
| 269 | 268 | 'class' => 'dektrium\user\Module', |