@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $languages = explode(',', getenv('APP_LANGUAGES')); |
17 | 17 | |
18 | 18 | // prepare asset bundle config |
19 | -$bundles = []; |
|
19 | +$bundles = [ ]; |
|
20 | 20 | if (getenv('APP_ASSET_USE_BUNDLED')) { |
21 | 21 | // include generated asset-bundle configuration |
22 | 22 | $bundles = include Yii::getAlias('@web/bundles').'/config.php'; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | return [ |
48 | 48 | 'id' => 'app', |
49 | 49 | 'name' => getenv('APP_TITLE'), |
50 | - 'language' => $languages[0], |
|
50 | + 'language' => $languages[ 0 ], |
|
51 | 51 | 'basePath' => realpath(__DIR__.'/..'), |
52 | 52 | 'vendorPath' => '@app/../vendor', |
53 | 53 | 'runtimePath' => '@app/../runtime', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ], |
63 | 63 | 'params' => [ |
64 | 64 | 'adminEmail' => getenv('APP_ADMIN_EMAIL'), |
65 | - 'context.menuItems' => [], |
|
65 | + 'context.menuItems' => [ ], |
|
66 | 66 | 'yii.migrations' => [ |
67 | 67 | getenv('APP_MIGRATION_LOOKUP'), |
68 | 68 | '@yii/rbac/migrations', |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ], |
88 | 88 | 'authManager' => [ |
89 | 89 | 'class' => 'dektrium\rbac\components\DbManager', |
90 | - 'defaultRoles' => ['Default'], |
|
90 | + 'defaultRoles' => [ 'Default' ], |
|
91 | 91 | ], |
92 | 92 | 'cache' => getenv('APP_NO_CACHE') ? null : [ |
93 | 93 | 'class' => 'yii\redis\Cache', |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | [ |
136 | 136 | 'class' => 'codemix\streamlog\Target', |
137 | 137 | 'url' => 'php://stderr', |
138 | - 'levels' => ['error', 'warning'], |
|
139 | - 'logVars' => [], |
|
138 | + 'levels' => [ 'error', 'warning' ], |
|
139 | + 'logVars' => [ ], |
|
140 | 140 | 'replaceNewline' => '' |
141 | 141 | ], |
142 | 142 | ], |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | 'user' => [ |
167 | 167 | 'class' => 'dmstr\web\User', |
168 | 168 | 'enableAutoLogin' => true, |
169 | - 'loginUrl' => ['/user/security/login'], |
|
169 | + 'loginUrl' => [ '/user/security/login' ], |
|
170 | 170 | 'identityClass' => 'dektrium\user\models\User', |
171 | - 'rootUsers' => ['admin'], |
|
171 | + 'rootUsers' => [ 'admin' ], |
|
172 | 172 | ], |
173 | 173 | 'urlManager' => [ |
174 | 174 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -199,14 +199,14 @@ discard block |
||
199 | 199 | 'auto_reload' => true, |
200 | 200 | ], |
201 | 201 | 'globals' => [ |
202 | - 'Html' => ['class'=>'\yii\helpers\Html'], |
|
203 | - 'Json' => ['class'=>'\yii\helpers\Json'], |
|
204 | - 'Tree' => ['class'=>'\dmstr\modules\pages\models\Tree'], |
|
205 | - 'FA' => ['class'=>'\rmrevin\yii\fontawesome\FA'], |
|
206 | - 'Url' => ['class'=>'\hrzg\filemanager\helpers\Url'], |
|
202 | + 'Html' => [ 'class'=>'\yii\helpers\Html' ], |
|
203 | + 'Json' => [ 'class'=>'\yii\helpers\Json' ], |
|
204 | + 'Tree' => [ 'class'=>'\dmstr\modules\pages\models\Tree' ], |
|
205 | + 'FA' => [ 'class'=>'\rmrevin\yii\fontawesome\FA' ], |
|
206 | + 'Url' => [ 'class'=>'\hrzg\filemanager\helpers\Url' ], |
|
207 | 207 | ], |
208 | 208 | 'functions' => [ |
209 | - 'image' => function ($imageSource, $preset = null) { |
|
209 | + 'image' => function($imageSource, $preset = null) { |
|
210 | 210 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples |
211 | 211 | return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). |
212 | 212 | $preset. |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'modules' => [ |
226 | 226 | 'audit' => [ |
227 | 227 | 'class' => 'bedezign\yii2\audit\Audit', |
228 | - 'accessRoles' => ['audit-module'], |
|
228 | + 'accessRoles' => [ 'audit-module' ], |
|
229 | 229 | 'layout' => '@backend/views/layouts/box', |
230 | 230 | 'panels' => [ |
231 | 231 | 'audit/request', |
@@ -233,15 +233,15 @@ discard block |
||
233 | 233 | 'audit/trail', |
234 | 234 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
235 | 235 | // These provide special functionality and get loaded to activate it |
236 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
237 | - 'audit/extra', // Links the data functions (`data()`) |
|
238 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
236 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
237 | + 'audit/extra', // Links the data functions (`data()`) |
|
238 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
239 | 239 | //'audit/db', |
240 | 240 | //'audit/log', |
241 | 241 | //'audit/profiling', |
242 | 242 | ], |
243 | 243 | 'ignoreActions' => [ |
244 | - (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*':'_'), |
|
244 | + (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*' : '_'), |
|
245 | 245 | 'app/*', |
246 | 246 | 'audit/*', |
247 | 247 | 'help/*', |
@@ -300,8 +300,8 @@ discard block |
||
300 | 300 | 'class' => 'lajax\translatemanager\Module', |
301 | 301 | 'root' => '@app/views', |
302 | 302 | 'layout' => '@backend/views/layouts/box', |
303 | - 'allowedIPs' => ['*'], |
|
304 | - 'roles' => ['translate-module'], |
|
303 | + 'allowedIPs' => [ '*' ], |
|
304 | + 'roles' => [ 'translate-module' ], |
|
305 | 305 | ], |
306 | 306 | 'user' => [ |
307 | 307 | 'class' => 'dektrium\user\Module', |
@@ -31,24 +31,24 @@ discard block |
||
31 | 31 | \yii\base\Event::on( |
32 | 32 | \yii\web\View::className(), |
33 | 33 | \yii\web\View::EVENT_AFTER_RENDER, |
34 | - function ($e) { |
|
35 | - $e->sender->assetBundles['yii\\bootstrap\\BootstrapAsset'] = null; |
|
34 | + function($e) { |
|
35 | + $e->sender->assetBundles[ 'yii\\bootstrap\\BootstrapAsset' ] = null; |
|
36 | 36 | }); |
37 | 37 | } |
38 | 38 | |
39 | 39 | // SEO |
40 | 40 | $route = Url::toRoute(Yii::$app->controller->action->uniqueId); |
41 | 41 | if ($keywords = \Yii::$app->settings->get($route, 'app.seo.keywords', null)) { |
42 | - $this->registerMetaTag(['name' => 'keywords', 'content' => $keywords]); |
|
42 | + $this->registerMetaTag([ 'name' => 'keywords', 'content' => $keywords ]); |
|
43 | 43 | } |
44 | 44 | if ($description = \Yii::$app->settings->get($route, 'app.seo.descriptions', null)) { |
45 | - $this->registerMetaTag(['name' => 'description', 'content' => $description]); |
|
45 | + $this->registerMetaTag([ 'name' => 'description', 'content' => $description ]); |
|
46 | 46 | } |
47 | 47 | if ($title = \Yii::$app->settings->get($route, 'app.seo.titles', null)) { |
48 | 48 | $this->title = $title; |
49 | 49 | } |
50 | 50 | if ($favicon = \Yii::$app->settings->get('faviconPng', 'app.assets', null)) { |
51 | - $this->registerLinkTag(['rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon]); |
|
51 | + $this->registerLinkTag([ 'rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon ]); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | ?> |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | 'linkSelector' => '.frontend-reload', |
76 | 76 | ]) ?> |
77 | 77 | |
78 | -<?= TwigWidget::widget(['key' => '_top', 'renderEmpty' => false]) ?> |
|
78 | +<?= TwigWidget::widget([ 'key' => '_top', 'renderEmpty' => false ]) ?> |
|
79 | 79 | |
80 | 80 | <!-- Navbar --> |
81 | 81 | <?php |
82 | 82 | if (Yii::$app->settings->get('enableTwigNavbar', 'app.layout', false)) { |
83 | - echo \dmstr\modules\prototype\widgets\TwigWidget::widget(['key' => '_navbar']); |
|
83 | + echo \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'key' => '_navbar' ]); |
|
84 | 84 | } else { |
85 | 85 | echo $this->render('_navbar'); |
86 | 86 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | <!-- Footer --> |
98 | 98 | <footer class="footer"> |
99 | - <?= Cell::widget(['id' => '_footer', 'requestParam' => '_global']) ?> |
|
99 | + <?= Cell::widget([ 'id' => '_footer', 'requestParam' => '_global' ]) ?> |
|
100 | 100 | </footer> |
101 | 101 | |
102 | 102 | <!-- Info Modal --> |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | <?= Html::a( |
106 | 106 | '<i class="fa fa-heartbeat"></i>', |
107 | 107 | '#', |
108 | - ['class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal'] |
|
108 | + [ 'class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal' ] |
|
109 | 109 | ) ?> |
110 | 110 | </p> |
111 | 111 | </div> |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | ]) ?> |
127 | 127 | |
128 | 128 | <?php if (Yii::$app->user->can('backend_default_index')): ?> |
129 | - <?= Toolbar::widget(['useIframe'=>Yii::$app->settings->get('useIframe', 'backend.toolbar')]) ?> |
|
129 | + <?= Toolbar::widget([ 'useIframe'=>Yii::$app->settings->get('useIframe', 'backend.toolbar') ]) ?> |
|
130 | 130 | <?php endif; ?> |
131 | 131 | |
132 | 132 | <?php $this->endBody() ?> |