Test Setup Failed
Branch master (661b24)
by Tobias
07:05
created
Category
web/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 require($rootPath.'/vendor/autoload.php');
5 5
 require($rootPath.'/src/config/env.php');
6 6
 
7
-defined('YII_DEBUG') or define('YII_DEBUG', (boolean)getenv('YII_DEBUG'));
7
+defined('YII_DEBUG') or define('YII_DEBUG', (boolean) getenv('YII_DEBUG'));
8 8
 defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV'));
9 9
 
10 10
 require($rootPath.'/vendor/yiisoft/yii2/Yii.php');
Please login to merge, or discard this patch.
src/config/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 return \yii\helpers\ArrayHelper::merge(
25 25
     require("{$configDir}/common.php"),
26 26
     require("{$configDir}/{$applicationType}.php"),
27
-    (file_exists("{$configDir}/common-{$env}.php")) ? require("{$configDir}/common-{$env}.php") : [],
28
-    (file_exists("{$configDir}/{$applicationType}-{$env}.php")) ? require("{$configDir}/{$applicationType}-{$env}.php") : [],
29
-    (file_exists(getenv('APP_CONFIG_FILE'))) ? require(getenv('APP_CONFIG_FILE')) : []
27
+    (file_exists("{$configDir}/common-{$env}.php")) ? require("{$configDir}/common-{$env}.php") : [ ],
28
+    (file_exists("{$configDir}/{$applicationType}-{$env}.php")) ? require("{$configDir}/{$applicationType}-{$env}.php") : [ ],
29
+    (file_exists(getenv('APP_CONFIG_FILE'))) ? require(getenv('APP_CONFIG_FILE')) : [ ]
30 30
 );
Please login to merge, or discard this patch.
src/config/web.php 1 patch
Spacing   +8 added lines, -8 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;
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
                 [
29 29
                     'class' => 'codemix\streamlog\Target',
30 30
                     'url' => 'php://stdout',
31
-                    'levels' => ['info', 'trace'],
32
-                    'logVars' => [],
31
+                    'levels' => [ 'info', 'trace' ],
32
+                    'logVars' => [ ],
33 33
                     'enabled' => YII_DEBUG && !YII_ENV_TEST,
34 34
                 ],
35 35
                 [
36 36
                     'class' => 'codemix\streamlog\Target',
37 37
                     'url' => 'php://stderr',
38
-                    'levels' => ['error', 'warning'],
39
-                    'logVars' => [],
38
+                    'levels' => [ 'error', 'warning' ],
39
+                    'logVars' => [ ],
40 40
                 ],
41 41
             ],
42 42
         ],
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         'settings' => [
59 59
             'class' => 'pheme\settings\Module',
60 60
             'layout' => '@backend/views/layouts/box',
61
-            'accessRoles' => ['settings-module'],
61
+            'accessRoles' => [ 'settings-module' ],
62 62
         ],
63 63
     ],
64 64
 ];
Please login to merge, or discard this patch.
src/config/common.php 1 patch
Spacing   +13 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // Basic configuration, used in web and console applications
21 21
 return [
22 22
     'id' => 'app',
23
-    'language' => $languages[0],
23
+    'language' => $languages[ 0 ],
24 24
     'basePath' => realpath(__DIR__.'/..'),
25 25
     'vendorPath' => '@app/../vendor',
26 26
     'runtimePath' => '@app/../runtime',
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     ],
34 34
     'params' => [
35 35
         'adminEmail' => getenv('APP_ADMIN_EMAIL'),
36
-        'context.menuItems' => [],
36
+        'context.menuItems' => [ ],
37 37
         'yii.migrations' => [
38 38
             getenv('APP_MIGRATION_LOOKUP'),
39 39
             '@yii/rbac/migrations',
@@ -48,19 +48,17 @@  discard block
 block discarded – undo
48 48
             // Note: For using mounted volumes or shared folders
49 49
             'dirMode' => YII_ENV_PROD ? 0777 : null,
50 50
             // Hashing for distributed systems
51
-            'hashCallback' => YII_ENV_DEV ? null : function ($path) {
51
+            'hashCallback' => YII_ENV_DEV ? null : function($path) {
52 52
                 return hash('sha1', getenv('APP_VERSION').':'.$path);
53 53
             },
54 54
             // Note: You need to bundle asset with `yii asset`
55 55
             'bundles' => getenv('APP_ASSET_USE_BUNDLED') ?
56
-                require Yii::getAlias('@web/bundles/config.php') :
57
-                (getenv('APP_ASSET_DISABLE_BOOTSTRAP_BUNDLE') ?
56
+                require Yii::getAlias('@web/bundles/config.php') : (getenv('APP_ASSET_DISABLE_BOOTSTRAP_BUNDLE') ?
58 57
                     [
59 58
                         'yii\bootstrap\BootstrapAsset' => [
60
-                            'css' => [],
59
+                            'css' => [ ],
61 60
                         ],
62
-                    ] :
63
-                    []),
61
+                    ] : [ ]),
64 62
             'basePath' => '@app/../web/assets',
65 63
         ],
66 64
         'authManager' => [
@@ -98,9 +96,9 @@  discard block
 block discarded – undo
98 96
         'user' => [
99 97
             'class' => 'dmstr\web\User',
100 98
             'enableAutoLogin' => true,
101
-            'loginUrl' => ['/user/security/login'],
99
+            'loginUrl' => [ '/user/security/login' ],
102 100
             'identityClass' => 'dektrium\user\models\User',
103
-            'rootUsers' => ['admin'],
101
+            'rootUsers' => [ 'admin' ],
104 102
         ],
105 103
         'urlManager' => [
106 104
             'class' => 'codemix\localeurls\UrlManager',
@@ -108,7 +106,7 @@  discard block
 block discarded – undo
108 106
             'showScriptName' => getenv('YII_ENV_TEST') ? true : false,
109 107
             'enableDefaultLanguageUrlCode' => true,
110 108
             'baseUrl' => '/',
111
-            'rules' => [],
109
+            'rules' => [ ],
112 110
             'languages' => $languages,
113 111
         ],
114 112
         'view' => [
@@ -121,8 +119,8 @@  discard block
 block discarded – undo
121 119
                     'options' => [
122 120
                         'auto_reload' => true,
123 121
                     ],
124
-                    'globals' => ['html' => '\yii\helpers\Html'],
125
-                    'uses' => ['yii\bootstrap'],
122
+                    'globals' => [ 'html' => '\yii\helpers\Html' ],
123
+                    'uses' => [ 'yii\bootstrap' ],
126 124
                 ],
127 125
                 // ...
128 126
             ],
@@ -150,8 +148,8 @@  discard block
 block discarded – undo
150 148
             'class' => 'lajax\translatemanager\Module',
151 149
             'root' => '@app/views',
152 150
             'layout' => '@backend/views/layouts/box',
153
-            'allowedIPs' => ['*'],
154
-            'roles' => ['translate-module'],
151
+            'allowedIPs' => [ '*' ],
152
+            'roles' => [ 'translate-module' ],
155 153
         ],
156 154
         'user' => [
157 155
             'class' => 'dektrium\user\Module',
Please login to merge, or discard this patch.
src/config/env.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 $dotenv->load();
19 19
 
20 20
 // Checks & validation
21
-$dotenv->required('YII_DEBUG', ['', '0', '1', 'true', true]);
22
-$dotenv->required('YII_ENV', ['dev', 'prod', 'test']);
21
+$dotenv->required('YII_DEBUG', [ '', '0', '1', 'true', true ]);
22
+$dotenv->required('YII_ENV', [ 'dev', 'prod', 'test' ]);
23 23
 $dotenv->required([
24 24
     'YII_TRACE_LEVEL',
25 25
     'APP_NAME',
Please login to merge, or discard this patch.
src/views/site/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 
6 6
 <div class="site-index">
7 7
 
8
-    <?= \dmstr\modules\prototype\widgets\TwigWidget::widget(['registerMenuItems' => true]) ?>
8
+    <?= \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'registerMenuItems' => true ]) ?>
9 9
 
10 10
 </div>
Please login to merge, or discard this patch.
src/views/layouts/container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
             <?=
6 6
             \yii\widgets\Breadcrumbs::widget(
7 7
                 [
8
-                    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
8
+                    'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [ ],
9 9
                 ]
10 10
             ) ?>
11 11
         </div>
Please login to merge, or discard this patch.
src/views/layouts/_modal.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
             <p style="line-height: 1.6em">
24 24
                 Application Version <span class="label label-info"><?= getenv('APP_NAME') ?>-<?= APP_VERSION ?></span>
25 25
                 <br>
26
-                Virtual Host <span class="label label-default"><?= isset($_SERVER['HTTP_HOST']) ?
27
-                        $_SERVER['HTTP_HOST'] : '' ?></span>
26
+                Virtual Host <span class="label label-default"><?= isset($_SERVER[ 'HTTP_HOST' ]) ?
27
+                        $_SERVER[ 'HTTP_HOST' ] : '' ?></span>
28 28
                 <br/>
29 29
                 Hostname <span class="label label-default"><?= getenv('HOSTNAME') ?: 'local' ?></span>
30 30
             </p>
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             <hr/>
38 38
 
39 39
             <div class="pull-right">
40
-                <?= Html::a('Backend', ['/backend'], ['class' => 'btn btn-default btn-xs']) ?>
40
+                <?= Html::a('Backend', [ '/backend' ], [ 'class' => 'btn btn-default btn-xs' ]) ?>
41 41
             </div>
42 42
             <div class="clearfix"></div>
43 43
 
Please login to merge, or discard this patch.
src/views/layouts/_navbar.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,56 +6,56 @@  discard block
 block discarded – undo
6 6
 use yii\bootstrap\Nav;
7 7
 use yii\bootstrap\NavBar;
8 8
 
9
-$menuItems = [];
10
-$languageItems = [];
9
+$menuItems = [ ];
10
+$languageItems = [ ];
11 11
 
12 12
 foreach (\Yii::$app->urlManager->languages as $language) {
13
-    $languageItems[] = [
14
-        'url' => ['/', \Yii::$app->urlManager->languageParam => $language],
13
+    $languageItems[ ] = [
14
+        'url' => [ '/', \Yii::$app->urlManager->languageParam => $language ],
15 15
         'label' => $language,
16 16
     ];
17 17
 }
18 18
 
19
-$menuItems[] = [
19
+$menuItems[ ] = [
20 20
     'label' => '<i class="glyphicon glyphicon-globe"></i> ',
21
-    'options' => ['id' => 'link-languages-menu'],
21
+    'options' => [ 'id' => 'link-languages-menu' ],
22 22
     'items' => $languageItems,
23 23
 ];
24 24
 
25 25
 if (\Yii::$app->hasModule('user')) {
26 26
     if (\Yii::$app->user->isGuest) {
27 27
         //$menuItems[] = ['label' => 'Signup', 'url' => ['/user/registration/register']];
28
-        $menuItems[] = [
28
+        $menuItems[ ] = [
29 29
             'label' => 'Login',
30
-            'url' => ['/user/security/login'],
31
-            'linkOptions' => ['id' => 'link-login'],
30
+            'url' => [ '/user/security/login' ],
31
+            'linkOptions' => [ 'id' => 'link-login' ],
32 32
         ];
33 33
     } else {
34
-        $menuItems[] = [
34
+        $menuItems[ ] = [
35 35
             'label' => '<i class="glyphicon glyphicon-user"></i> '.\Yii::$app->user->identity->username,
36
-            'options' => ['id' => 'link-user-menu'],
36
+            'options' => [ 'id' => 'link-user-menu' ],
37 37
             'items' => [
38 38
                 [
39 39
                     'label' => '<i class="glyphicon glyphicon-user"></i> Profile',
40
-                    'url' => ['/user/profile/show', 'id' => \Yii::$app->user->id],
40
+                    'url' => [ '/user/profile/show', 'id' => \Yii::$app->user->id ],
41 41
                 ],
42 42
                 '<li class="divider"></li>',
43 43
                 [
44 44
                     'label' => '<i class="glyphicon glyphicon-log-out"></i> Logout',
45
-                    'url' => ['/user/security/logout'],
46
-                    'linkOptions' => ['data-method' => 'post', 'id' => 'link-logout'],
45
+                    'url' => [ '/user/security/logout' ],
46
+                    'linkOptions' => [ 'data-method' => 'post', 'id' => 'link-logout' ],
47 47
                 ],
48 48
             ],
49 49
         ];
50
-        $menuItems[] = [
50
+        $menuItems[ ] = [
51 51
             'label' => '<i class="glyphicon glyphicon-cog"></i>',
52
-            'visible' => \Yii::$app->user->can('backend_default_index', ['route' => true]),
53
-            'items' => \Yii::$app->params['context.menuItems'],
52
+            'visible' => \Yii::$app->user->can('backend_default_index', [ 'route' => true ]),
53
+            'items' => \Yii::$app->params[ 'context.menuItems' ],
54 54
         ];
55
-        $menuItems[] = [
55
+        $menuItems[ ] = [
56 56
             'label' => '<i class="glyphicon glyphicon-dashboard"></i>',
57
-            'url' => ['/backend'],
58
-            'visible' => \Yii::$app->user->can('backend_default_index', ['route' => true]),
57
+            'url' => [ '/backend' ],
58
+            'visible' => \Yii::$app->user->can('backend_default_index', [ 'route' => true ]),
59 59
             'items' => Tree::getMenuItems('backend', true, Tree::GLOBAL_ACCESS_DOMAIN),
60 60
         ];
61 61
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 echo Nav::widget(
75 75
     [
76
-        'options' => ['class' => 'navbar-nav'],
76
+        'options' => [ 'class' => 'navbar-nav' ],
77 77
         'encodeLabels' => false,
78 78
         'items' => \dmstr\modules\pages\models\Tree::getMenuItems('root'),
79 79
     ]
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 echo Nav::widget(
83 83
     [
84
-        'options' => ['class' => 'navbar-nav navbar-right'],
84
+        'options' => [ 'class' => 'navbar-nav navbar-right' ],
85 85
         'encodeLabels' => false,
86 86
         'items' => $menuItems,
87 87
     ]
Please login to merge, or discard this patch.