Test Setup Failed
Push — master ( e2c295...f0b7d0 )
by Tobias
10:26
created
src/config/web.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 
12 12
 // Settings for web-application only
13 13
 return [
14
-    'on registerMenuItems' => function ($event) {
15
-        Yii::$app->params['context.menuItems'] = \yii\helpers\ArrayHelper::merge(
16
-            Yii::$app->params['context.menuItems'],
14
+    'on registerMenuItems' => function($event) {
15
+        Yii::$app->params[ 'context.menuItems' ] = \yii\helpers\ArrayHelper::merge(
16
+            Yii::$app->params[ 'context.menuItems' ],
17 17
             $event->sender->getMenuItems()
18 18
         );
19 19
         $event->handled = true;
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
                 [
30 30
                     'class' => 'codemix\streamlog\Target',
31 31
                     'url' => 'php://stdout',
32
-                    'levels' => ['info', 'trace'],
33
-                    'logVars' => [],
32
+                    'levels' => [ 'info', 'trace' ],
33
+                    'logVars' => [ ],
34 34
                     'replaceNewline' => YII_DEBUG ? null : '',
35 35
                     'enabled' => YII_DEBUG && !YII_ENV_TEST,
36 36
                 ],
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         'settings' => [
56 56
             'class' => 'pheme\settings\Module',
57 57
             'layout' => '@backend/views/layouts/box',
58
-            'accessRoles' => ['settings-module'],
58
+            'accessRoles' => [ 'settings-module' ],
59 59
         ],
60 60
     ],
61 61
 ];
Please login to merge, or discard this patch.
src/views/layouts/_navbar.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@  discard block
 block discarded – undo
6 6
 use yii\bootstrap\NavBar;
7 7
 
8 8
 // initialize local variables
9
-$menuItems = [];
10
-$languageItems = [];
9
+$menuItems = [ ];
10
+$languageItems = [ ];
11 11
 
12 12
 
13 13
 // prepare languages
14 14
 foreach (\Yii::$app->urlManager->languages as $language) {
15
-    $languageItems[] = [
16
-        'url' => ['/', \Yii::$app->urlManager->languageParam => $language],
15
+    $languageItems[ ] = [
16
+        'url' => [ '/', \Yii::$app->urlManager->languageParam => $language ],
17 17
         'label' => $language,
18 18
     ];
19 19
 }
20 20
 
21 21
 // add language items to menu
22
-$menuItems[] = [
22
+$menuItems[ ] = [
23 23
     'label' => '<i class="glyphicon glyphicon-globe"></i> '.\Yii::$app->language,
24
-    'options' => ['id' => 'link-languages-menu'],
24
+    'options' => [ 'id' => 'link-languages-menu' ],
25 25
     'items' => $languageItems,
26 26
 ];
27 27
 
@@ -30,30 +30,30 @@  discard block
 block discarded – undo
30 30
     if (\Yii::$app->user->isGuest) {
31 31
         // unauthorized users
32 32
         //$menuItems[] = ['label' => 'Signup', 'url' => ['/user/registration/register']];
33
-        $menuItems[] = [
33
+        $menuItems[ ] = [
34 34
             'label' => 'Login',
35
-            'url' => ['/user/security/login'],
36
-            'linkOptions' => ['id' => 'link-login'],
35
+            'url' => [ '/user/security/login' ],
36
+            'linkOptions' => [ 'id' => 'link-login' ],
37 37
         ];
38 38
     } else {
39 39
         // logged in users
40
-        $menuItems[] = [
40
+        $menuItems[ ] = [
41 41
             'label' => '<i class="glyphicon glyphicon-user"></i> '.\Yii::$app->user->identity->username,
42
-            'options' => ['id' => 'link-user-menu'],
42
+            'options' => [ 'id' => 'link-user-menu' ],
43 43
             'items' => [
44 44
                 [
45 45
                     'label' => '<i class="glyphicon glyphicon-user"></i> Profile',
46
-                    'url' => ['/user/profile/show', 'id' => \Yii::$app->user->id],
46
+                    'url' => [ '/user/profile/show', 'id' => \Yii::$app->user->id ],
47 47
                 ],
48 48
                 [
49 49
                     'label' => '<i class="glyphicon glyphicon-cog"></i> Settings',
50
-                    'url' => ['/user/settings/profile'],
50
+                    'url' => [ '/user/settings/profile' ],
51 51
                 ],
52 52
                 '<li class="divider"></li>',
53 53
                 [
54 54
                     'label' => '<i class="glyphicon glyphicon-log-out"></i> Logout',
55
-                    'url' => ['/user/security/logout'],
56
-                    'linkOptions' => ['data-method' => 'post', 'id' => 'link-logout'],
55
+                    'url' => [ '/user/security/logout' ],
56
+                    'linkOptions' => [ 'data-method' => 'post', 'id' => 'link-logout' ],
57 57
                 ],
58 58
             ],
59 59
         ];
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 // render root pages
76 76
 echo Nav::widget(
77 77
     [
78
-        'options' => ['class' => 'navbar-nav'],
78
+        'options' => [ 'class' => 'navbar-nav' ],
79 79
         'encodeLabels' => false,
80 80
         'items' => \dmstr\modules\pages\models\Tree::getMenuItems('root'),
81 81
     ]
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 // render additional menu items (languages, user)
85 85
 echo Nav::widget(
86 86
     [
87
-        'options' => ['class' => 'navbar-nav navbar-right'],
87
+        'options' => [ 'class' => 'navbar-nav navbar-right' ],
88 88
         'encodeLabels' => false,
89 89
         'items' => $menuItems,
90 90
     ]
Please login to merge, or discard this patch.
src/controllers/SiteController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 
33 33
     public function actionRootNode()
34 34
     {
35
-        $rootNodeQuery = \dmstr\modules\pages\models\Tree::find()->where(['domain_id' => 'root']);
35
+        $rootNodeQuery = \dmstr\modules\pages\models\Tree::find()->where([ 'domain_id' => 'root' ]);
36 36
         $rootNode = $rootNodeQuery->one();
37
-        return $this->run('/pages/default/page', ['pageId' => $rootNode->id]);
37
+        return $this->run('/pages/default/page', [ 'pageId' => $rootNode->id ]);
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/views/layouts/main.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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([
Please login to merge, or discard this patch.
src/config/common.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         'context.menuItems' => [],
69 69
         'yii.migrations' => ArrayHelper::merge(
70 70
             explode(',', getenv('APP_MIGRATION_LOOKUP')),
71
-           [
71
+            [
72 72
                 '@yii/rbac/migrations',
73 73
                 '@yii/web/migrations',
74 74
                 '@bedezign/yii2/audit/migrations',
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,8 +306,8 @@  discard block
 block discarded – undo
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',
Please login to merge, or discard this patch.