@@ -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 |
@@ -124,8 +123,8 @@ discard block |
||
124 | 123 | [ |
125 | 124 | 'class' => 'codemix\streamlog\Target', |
126 | 125 | 'url' => 'php://stderr', |
127 | - 'levels' => ['error', 'warning'], |
|
128 | - 'logVars' => [], |
|
126 | + 'levels' => [ 'error', 'warning' ], |
|
127 | + 'logVars' => [ ], |
|
129 | 128 | ], |
130 | 129 | ], |
131 | 130 | ], |
@@ -154,9 +153,9 @@ discard block |
||
154 | 153 | 'user' => [ |
155 | 154 | 'class' => 'dmstr\web\User', |
156 | 155 | 'enableAutoLogin' => true, |
157 | - 'loginUrl' => ['/user/security/login'], |
|
156 | + 'loginUrl' => [ '/user/security/login' ], |
|
158 | 157 | 'identityClass' => 'dektrium\user\models\User', |
159 | - 'rootUsers' => ['admin'], |
|
158 | + 'rootUsers' => [ 'admin' ], |
|
160 | 159 | ], |
161 | 160 | 'urlManager' => [ |
162 | 161 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -164,7 +163,7 @@ discard block |
||
164 | 163 | 'showScriptName' => false, |
165 | 164 | 'enableDefaultLanguageUrlCode' => true, |
166 | 165 | 'baseUrl' => '/', |
167 | - 'rules' => [], |
|
166 | + 'rules' => [ ], |
|
168 | 167 | 'languages' => $languages, |
169 | 168 | ], |
170 | 169 | 'view' => [ |
@@ -176,8 +175,8 @@ discard block |
||
176 | 175 | 'options' => [ |
177 | 176 | 'auto_reload' => true, |
178 | 177 | ], |
179 | - 'globals' => ['html' => '\yii\helpers\Html'], |
|
180 | - 'uses' => ['yii\bootstrap'], |
|
178 | + 'globals' => [ 'html' => '\yii\helpers\Html' ], |
|
179 | + 'uses' => [ 'yii\bootstrap' ], |
|
181 | 180 | ], |
182 | 181 | ], |
183 | 182 | ], |
@@ -198,9 +197,9 @@ discard block |
||
198 | 197 | // 'audit/config', |
199 | 198 | |
200 | 199 | // These provide special functionality and get loaded to activate it |
201 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
202 | - 'audit/extra', // Links the data functions (`data()`) |
|
203 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
200 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
201 | + 'audit/extra', // Links the data functions (`data()`) |
|
202 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
204 | 203 | ], |
205 | 204 | 'ignoreActions' => [ |
206 | 205 | 'audit/*', |
@@ -250,8 +249,8 @@ discard block |
||
250 | 249 | 'class' => 'lajax\translatemanager\Module', |
251 | 250 | 'root' => '@app/views', |
252 | 251 | 'layout' => '@backend/views/layouts/box', |
253 | - 'allowedIPs' => ['*'], |
|
254 | - 'roles' => ['translate-module'], |
|
252 | + 'allowedIPs' => [ '*' ], |
|
253 | + 'roles' => [ 'translate-module' ], |
|
255 | 254 | ], |
256 | 255 | 'user' => [ |
257 | 256 | 'class' => 'dektrium\user\Module', |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | Yii::setAlias('@webroot', '@root/web'); |
27 | 27 | |
28 | 28 | // Use a closure to not pollute the global namespace |
29 | -return call_user_func(function () { |
|
29 | +return call_user_func(function() { |
|
30 | 30 | |
31 | 31 | /*function checkFile(){ |
32 | 32 | if (file_exists($file)) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | "{$configDir}/".APP_TYPE.'.php' => true, |
41 | 41 | "{$configDir}/common-".YII_ENV.'.php' => false, |
42 | 42 | "{$configDir}/".APP_TYPE.'-'.YII_ENV.'.php' => false, |
43 | - "{$configDir}/".APP_TYPE.'-'.((YII_DEBUG)?'debug':'release').'.php' => false, |
|
43 | + "{$configDir}/".APP_TYPE.'-'.((YII_DEBUG) ? 'debug' : 'release').'.php' => false, |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | if (!empty(getenv('APP_CONFIG_FILE'))) { |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | // Merge additional configurations |
49 | 49 | foreach ($additionalConfigFiles as $alias) { |
50 | 50 | $file = Yii::getAlias($alias); |
51 | - $configFiles[$file] = true; |
|
51 | + $configFiles[ $file ] = true; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | 55 | // Merge configurations |
56 | - $config = []; |
|
56 | + $config = [ ]; |
|
57 | 57 | //var_dump($configFiles);exit; |
58 | 58 | Yii::trace($configFiles, __METHOD__); |
59 | 59 | foreach ($configFiles as $file => $isRequired) { |