@@ -17,7 +17,7 @@ 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 | 23 | $bundles = include Yii::getAlias('@web/bundles').'/config.php'; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | return [ |
| 49 | 49 | 'id' => 'app', |
| 50 | 50 | 'name' => getenv('APP_TITLE'), |
| 51 | - 'language' => $languages[0], |
|
| 51 | + 'language' => $languages[ 0 ], |
|
| 52 | 52 | 'basePath' => realpath(__DIR__.'/..'), |
| 53 | 53 | 'vendorPath' => '@app/../vendor', |
| 54 | 54 | 'runtimePath' => '@app/../runtime', |
@@ -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 | [ |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | ], |
| 93 | 93 | 'authManager' => [ |
| 94 | 94 | 'class' => 'dektrium\rbac\components\DbManager', |
| 95 | - 'defaultRoles' => ['Default'], |
|
| 95 | + 'defaultRoles' => [ 'Default' ], |
|
| 96 | 96 | ], |
| 97 | 97 | 'cache' => getenv('APP_NO_CACHE') ? null : [ |
| 98 | 98 | 'class' => 'yii\redis\Cache', |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | [ |
| 141 | 141 | 'class' => 'codemix\streamlog\Target', |
| 142 | 142 | 'url' => 'php://stderr', |
| 143 | - 'levels' => ['error', 'warning'], |
|
| 144 | - 'logVars' => [], |
|
| 143 | + 'levels' => [ 'error', 'warning' ], |
|
| 144 | + 'logVars' => [ ], |
|
| 145 | 145 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', |
| 146 | 146 | ], |
| 147 | 147 | ], |
@@ -171,9 +171,9 @@ discard block |
||
| 171 | 171 | 'user' => [ |
| 172 | 172 | 'class' => 'dmstr\web\User', |
| 173 | 173 | 'enableAutoLogin' => true, |
| 174 | - 'loginUrl' => ['/user/security/login'], |
|
| 174 | + 'loginUrl' => [ '/user/security/login' ], |
|
| 175 | 175 | 'identityClass' => 'dektrium\user\models\User', |
| 176 | - 'rootUsers' => ['admin'], |
|
| 176 | + 'rootUsers' => [ 'admin' ], |
|
| 177 | 177 | ], |
| 178 | 178 | 'urlManager' => [ |
| 179 | 179 | 'class' => 'codemix\localeurls\UrlManager', |
@@ -204,15 +204,15 @@ discard block |
||
| 204 | 204 | 'auto_reload' => true, |
| 205 | 205 | ], |
| 206 | 206 | 'globals' => [ |
| 207 | - 'Html' => ['class' => '\yii\helpers\Html'], |
|
| 208 | - 'Json' => ['class' => '\yii\helpers\Json'], |
|
| 209 | - 'Tree' => ['class' => '\dmstr\modules\pages\models\Tree'], |
|
| 210 | - 'FA' => ['class' => '\rmrevin\yii\fontawesome\FA'], |
|
| 211 | - 'FileUrl' => ['class' => '\hrzg\filemanager\helpers\Url'], |
|
| 212 | - 'Url' => ['class' => '\yii\helpers\Url'], |
|
| 207 | + 'Html' => [ 'class' => '\yii\helpers\Html' ], |
|
| 208 | + 'Json' => [ 'class' => '\yii\helpers\Json' ], |
|
| 209 | + 'Tree' => [ 'class' => '\dmstr\modules\pages\models\Tree' ], |
|
| 210 | + 'FA' => [ 'class' => '\rmrevin\yii\fontawesome\FA' ], |
|
| 211 | + 'FileUrl' => [ 'class' => '\hrzg\filemanager\helpers\Url' ], |
|
| 212 | + 'Url' => [ 'class' => '\yii\helpers\Url' ], |
|
| 213 | 213 | ], |
| 214 | 214 | 'functions' => [ |
| 215 | - 'image' => function ($imageSource, $preset = null) { |
|
| 215 | + 'image' => function($imageSource, $preset = null) { |
|
| 216 | 216 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples |
| 217 | 217 | return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). |
| 218 | 218 | $preset. |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | 'modules' => [ |
| 232 | 232 | 'audit' => [ |
| 233 | 233 | 'class' => 'bedezign\yii2\audit\Audit', |
| 234 | - 'accessRoles' => ['audit-module'], |
|
| 234 | + 'accessRoles' => [ 'audit-module' ], |
|
| 235 | 235 | 'layout' => '@backend/views/layouts/box', |
| 236 | 236 | 'panels' => [ |
| 237 | 237 | 'audit/request', |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | 'audit/trail', |
| 240 | 240 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
| 241 | 241 | // These provide special functionality and get loaded to activate it |
| 242 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 243 | - 'audit/extra', // Links the data functions (`data()`) |
|
| 244 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 242 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 243 | + 'audit/extra', // Links the data functions (`data()`) |
|
| 244 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 245 | 245 | //'audit/db', |
| 246 | 246 | //'audit/log', |
| 247 | 247 | //'audit/profiling', |
@@ -306,15 +306,15 @@ discard block |
||
| 306 | 306 | 'class' => 'lajax\translatemanager\Module', |
| 307 | 307 | 'root' => '@app/views', |
| 308 | 308 | 'layout' => '@backend/views/layouts/box', |
| 309 | - 'allowedIPs' => ['*'], |
|
| 310 | - 'roles' => ['translate-module'], |
|
| 309 | + 'allowedIPs' => [ '*' ], |
|
| 310 | + 'roles' => [ 'translate-module' ], |
|
| 311 | 311 | ], |
| 312 | 312 | 'user' => [ |
| 313 | 313 | 'class' => 'dektrium\user\Module', |
| 314 | 314 | 'layout' => '@app/views/layouts/container', |
| 315 | 315 | 'defaultRoute' => 'admin', |
| 316 | 316 | 'adminPermission' => 'user-module', |
| 317 | - 'admins' => ['admin'], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
| 317 | + 'admins' => [ 'admin' ], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
| 318 | 318 | 'enableFlashMessages' => false, |
| 319 | 319 | 'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), |
| 320 | 320 | ], |
@@ -31,11 +31,11 @@ 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) { |
|
| 34 | + function($e) { |
|
| 35 | 35 | // disable unbundled asset |
| 36 | - $e->sender->assetBundles['yii\\bootstrap\\BootstrapAsset'] = null; |
|
| 36 | + $e->sender->assetBundles[ 'yii\\bootstrap\\BootstrapAsset' ] = null; |
|
| 37 | 37 | // disable bundled asset |
| 38 | - $e->sender->assetBundles['bootstrap'] = null; |
|
| 38 | + $e->sender->assetBundles[ 'bootstrap' ] = null; |
|
| 39 | 39 | } |
| 40 | 40 | ); |
| 41 | 41 | } |
@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | // SEO |
| 44 | 44 | $route = Url::toRoute(Yii::$app->controller->action->uniqueId); |
| 45 | 45 | if ($keywords = \Yii::$app->settings->get($route, 'app.seo.keywords', null)) { |
| 46 | - $this->registerMetaTag(['name' => 'keywords', 'content' => $keywords]); |
|
| 46 | + $this->registerMetaTag([ 'name' => 'keywords', 'content' => $keywords ]); |
|
| 47 | 47 | } |
| 48 | 48 | if ($description = \Yii::$app->settings->get($route, 'app.seo.descriptions', null)) { |
| 49 | - $this->registerMetaTag(['name' => 'description', 'content' => $description]); |
|
| 49 | + $this->registerMetaTag([ 'name' => 'description', 'content' => $description ]); |
|
| 50 | 50 | } |
| 51 | 51 | if ($title = \Yii::$app->settings->get($route, 'app.seo.titles', null)) { |
| 52 | 52 | $this->title = $title; |
| 53 | 53 | } |
| 54 | 54 | if ($favicon = \Yii::$app->settings->get('faviconPng', 'app.assets', null)) { |
| 55 | - $this->registerLinkTag(['rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon]); |
|
| 55 | + $this->registerLinkTag([ 'rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | ?> |
@@ -79,12 +79,12 @@ discard block |
||
| 79 | 79 | 'linkSelector' => '.frontend-reload', |
| 80 | 80 | ]) ?> |
| 81 | 81 | |
| 82 | -<?= TwigWidget::widget(['key' => '_beginBody', 'renderEmpty' => false]) ?> |
|
| 82 | +<?= TwigWidget::widget([ 'key' => '_beginBody', 'renderEmpty' => false ]) ?> |
|
| 83 | 83 | |
| 84 | 84 | <!-- Navbar --> |
| 85 | 85 | <?php |
| 86 | 86 | if (Yii::$app->settings->get('enableTwigNavbar', 'app.layout', false)) { |
| 87 | - echo \dmstr\modules\prototype\widgets\TwigWidget::widget(['key' => '_navbar']); |
|
| 87 | + echo \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'key' => '_navbar' ]); |
|
| 88 | 88 | } else { |
| 89 | 89 | echo $this->render('_navbar'); |
| 90 | 90 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | <!-- Footer --> |
| 102 | 102 | <footer class="footer"> |
| 103 | - <?= Cell::widget(['id' => '_footer', 'requestParam' => '_global']) ?> |
|
| 103 | + <?= Cell::widget([ 'id' => '_footer', 'requestParam' => '_global' ]) ?> |
|
| 104 | 104 | </footer> |
| 105 | 105 | |
| 106 | 106 | <!-- Info Modal --> |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | <?= Html::a( |
| 111 | 111 | '<i class="fa fa-heartbeat"></i>', |
| 112 | 112 | '#', |
| 113 | - ['class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal'] |
|
| 113 | + [ 'class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal' ] |
|
| 114 | 114 | ) ?> |
| 115 | 115 | </p> |
| 116 | 116 | </div> |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ], |
| 131 | 131 | ]) ?> |
| 132 | 132 | |
| 133 | -<?= TwigWidget::widget(['key' => '_endBody', 'renderEmpty' => false]) ?> |
|
| 133 | +<?= TwigWidget::widget([ 'key' => '_endBody', 'renderEmpty' => false ]) ?> |
|
| 134 | 134 | |
| 135 | 135 | <?php if (Yii::$app->user->can('backend_default_index')): ?> |
| 136 | 136 | <?= Toolbar::widget([ |