@@ -31,8 +31,8 @@ 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 | } |
@@ -40,16 +40,16 @@ discard block |
||
| 40 | 40 | // SEO |
| 41 | 41 | $route = Url::toRoute(Yii::$app->controller->action->uniqueId); |
| 42 | 42 | if ($keywords = \Yii::$app->settings->get($route, 'app.seo.keywords', null)) { |
| 43 | - $this->registerMetaTag(['name' => 'keywords', 'content' => $keywords]); |
|
| 43 | + $this->registerMetaTag([ 'name' => 'keywords', 'content' => $keywords ]); |
|
| 44 | 44 | } |
| 45 | 45 | if ($description = \Yii::$app->settings->get($route, 'app.seo.descriptions', null)) { |
| 46 | - $this->registerMetaTag(['name' => 'description', 'content' => $description]); |
|
| 46 | + $this->registerMetaTag([ 'name' => 'description', 'content' => $description ]); |
|
| 47 | 47 | } |
| 48 | 48 | if ($title = \Yii::$app->settings->get($route, 'app.seo.titles', null)) { |
| 49 | 49 | $this->title = $title; |
| 50 | 50 | } |
| 51 | 51 | if ($favicon = \Yii::$app->settings->get('faviconPng', 'app.assets', null)) { |
| 52 | - $this->registerLinkTag(['rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon]); |
|
| 52 | + $this->registerLinkTag([ 'rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon ]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | ?> |
@@ -76,12 +76,12 @@ discard block |
||
| 76 | 76 | 'linkSelector' => '.frontend-reload', |
| 77 | 77 | ]) ?> |
| 78 | 78 | |
| 79 | -<?= TwigWidget::widget(['key' => '_beginBody', 'renderEmpty' => false]) ?> |
|
| 79 | +<?= TwigWidget::widget([ 'key' => '_beginBody', 'renderEmpty' => false ]) ?> |
|
| 80 | 80 | |
| 81 | 81 | <!-- Navbar --> |
| 82 | 82 | <?php |
| 83 | 83 | if (Yii::$app->settings->get('enableTwigNavbar', 'app.layout', false)) { |
| 84 | - echo \dmstr\modules\prototype\widgets\TwigWidget::widget(['key' => '_navbar']); |
|
| 84 | + echo \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'key' => '_navbar' ]); |
|
| 85 | 85 | } else { |
| 86 | 86 | echo $this->render('_navbar'); |
| 87 | 87 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | <!-- Footer --> |
| 99 | 99 | <footer class="footer"> |
| 100 | - <?= Cell::widget(['id' => '_footer', 'requestParam' => '_global']) ?> |
|
| 100 | + <?= Cell::widget([ 'id' => '_footer', 'requestParam' => '_global' ]) ?> |
|
| 101 | 101 | </footer> |
| 102 | 102 | |
| 103 | 103 | <!-- Info Modal --> |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | <?= Html::a( |
| 108 | 108 | '<i class="fa fa-heartbeat"></i>', |
| 109 | 109 | '#', |
| 110 | - ['class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal'] |
|
| 110 | + [ 'class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal' ] |
|
| 111 | 111 | ) ?> |
| 112 | 112 | </p> |
| 113 | 113 | </div> |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ], |
| 128 | 128 | ]) ?> |
| 129 | 129 | |
| 130 | -<?= TwigWidget::widget(['key' => '_endBody', 'renderEmpty' => false]) ?> |
|
| 130 | +<?= TwigWidget::widget([ 'key' => '_endBody', 'renderEmpty' => false ]) ?> |
|
| 131 | 131 | |
| 132 | 132 | <?php if (Yii::$app->user->can('backend_default_index')): ?> |
| 133 | 133 | <?= Toolbar::widget([ |
@@ -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', |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | ], |
| 65 | 65 | 'params' => [ |
| 66 | 66 | 'adminEmail' => getenv('APP_ADMIN_EMAIL'), |
| 67 | - 'context.menuItems' => [], |
|
| 67 | + 'context.menuItems' => [ ], |
|
| 68 | 68 | 'yii.migrations' => [ |
| 69 | 69 | getenv('APP_MIGRATION_LOOKUP'), |
| 70 | 70 | '@yii/rbac/migrations', |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ], |
| 90 | 90 | 'authManager' => [ |
| 91 | 91 | 'class' => 'dektrium\rbac\components\DbManager', |
| 92 | - 'defaultRoles' => ['Default'], |
|
| 92 | + 'defaultRoles' => [ 'Default' ], |
|
| 93 | 93 | ], |
| 94 | 94 | 'cache' => getenv('APP_NO_CACHE') ? null : [ |
| 95 | 95 | 'class' => 'yii\redis\Cache', |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | [ |
| 138 | 138 | 'class' => 'codemix\streamlog\Target', |
| 139 | 139 | 'url' => 'php://stderr', |
| 140 | - 'levels' => ['error', 'warning'], |
|
| 141 | - 'logVars' => [], |
|
| 140 | + 'levels' => [ 'error', 'warning' ], |
|
| 141 | + 'logVars' => [ ], |
|
| 142 | 142 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', |
| 143 | 143 | ], |
| 144 | 144 | ], |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | 'user' => [ |
| 169 | 169 | 'class' => 'dmstr\web\User', |
| 170 | 170 | 'enableAutoLogin' => true, |
| 171 | - 'loginUrl' => ['/user/security/login'], |
|
| 171 | + 'loginUrl' => [ '/user/security/login' ], |
|
| 172 | 172 | 'identityClass' => 'dektrium\user\models\User', |
| 173 | - 'rootUsers' => ['admin'], |
|
| 173 | + 'rootUsers' => [ 'admin' ], |
|
| 174 | 174 | ], |
| 175 | 175 | 'urlManager' => [ |
| 176 | 176 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -201,15 +201,15 @@ discard block |
||
| 201 | 201 | 'auto_reload' => true, |
| 202 | 202 | ], |
| 203 | 203 | 'globals' => [ |
| 204 | - 'Html' => ['class' => '\yii\helpers\Html'], |
|
| 205 | - 'Json' => ['class' => '\yii\helpers\Json'], |
|
| 206 | - 'Tree' => ['class' => '\dmstr\modules\pages\models\Tree'], |
|
| 207 | - 'FA' => ['class' => '\rmrevin\yii\fontawesome\FA'], |
|
| 208 | - 'FileUrl' => ['class' => '\hrzg\filemanager\helpers\Url'], |
|
| 209 | - 'Url' => ['class' => '\yii\helpers\Url'], |
|
| 204 | + 'Html' => [ 'class' => '\yii\helpers\Html' ], |
|
| 205 | + 'Json' => [ 'class' => '\yii\helpers\Json' ], |
|
| 206 | + 'Tree' => [ 'class' => '\dmstr\modules\pages\models\Tree' ], |
|
| 207 | + 'FA' => [ 'class' => '\rmrevin\yii\fontawesome\FA' ], |
|
| 208 | + 'FileUrl' => [ 'class' => '\hrzg\filemanager\helpers\Url' ], |
|
| 209 | + 'Url' => [ 'class' => '\yii\helpers\Url' ], |
|
| 210 | 210 | ], |
| 211 | 211 | 'functions' => [ |
| 212 | - 'image' => function ($imageSource, $preset = null) { |
|
| 212 | + 'image' => function($imageSource, $preset = null) { |
|
| 213 | 213 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples |
| 214 | 214 | return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). |
| 215 | 215 | $preset. |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | 'modules' => [ |
| 229 | 229 | 'audit' => [ |
| 230 | 230 | 'class' => 'bedezign\yii2\audit\Audit', |
| 231 | - 'accessRoles' => ['audit-module'], |
|
| 231 | + 'accessRoles' => [ 'audit-module' ], |
|
| 232 | 232 | 'layout' => '@backend/views/layouts/box', |
| 233 | 233 | 'panels' => [ |
| 234 | 234 | 'audit/request', |
@@ -236,9 +236,9 @@ discard block |
||
| 236 | 236 | 'audit/trail', |
| 237 | 237 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
| 238 | 238 | // These provide special functionality and get loaded to activate it |
| 239 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 240 | - 'audit/extra', // Links the data functions (`data()`) |
|
| 241 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 239 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 240 | + 'audit/extra', // Links the data functions (`data()`) |
|
| 241 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 242 | 242 | //'audit/db', |
| 243 | 243 | //'audit/log', |
| 244 | 244 | //'audit/profiling', |
@@ -303,8 +303,8 @@ discard block |
||
| 303 | 303 | 'class' => 'lajax\translatemanager\Module', |
| 304 | 304 | 'root' => '@app/views', |
| 305 | 305 | 'layout' => '@backend/views/layouts/box', |
| 306 | - 'allowedIPs' => ['*'], |
|
| 307 | - 'roles' => ['translate-module'], |
|
| 306 | + 'allowedIPs' => [ '*' ], |
|
| 307 | + 'roles' => [ 'translate-module' ], |
|
| 308 | 308 | ], |
| 309 | 309 | 'user' => [ |
| 310 | 310 | 'class' => 'dektrium\user\Module', |