Test Failed
Push — master ( b1cfa1...c8f509 )
by Tobias
11:38
created
src/commands/AppController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
     public function actionConfig($key = null)
29 29
     {
30 30
         // get config from global variable (TODO)
31
-        $data = $GLOBALS['config'];
31
+        $data = $GLOBALS[ 'config' ];
32 32
         if ($key) {
33 33
             $keys = explode('.', $key);
34
-            if (isset($keys[0])) {
35
-                $data = $GLOBALS['config'][$keys[0]];
34
+            if (isset($keys[ 0 ])) {
35
+                $data = $GLOBALS[ 'config' ][ $keys[ 0 ] ];
36 36
             }
37
-            if (isset($keys[1])) {
38
-                $data = $GLOBALS['config'][$keys[0]][$keys[1]];
37
+            if (isset($keys[ 1 ])) {
38
+                $data = $GLOBALS[ 'config' ][ $keys[ 0 ] ][ $keys[ 1 ] ];
39 39
             }
40 40
         }
41 41
         $this->stdout(VarDumper::dumpAsString($data));
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
         $this->stdout("=====================\n");
73 73
         $this->stdout("Initializing application\n");
74 74
 
75
-        $this->interactive = (bool)getenv('APP_INTERACTIVE');
75
+        $this->interactive = (bool) getenv('APP_INTERACTIVE');
76 76
 
77 77
         $this->stdout("\nDatabase\n");
78 78
         $this->stdout("--------\n");
79 79
         $this->run('db/create');
80
-        $this->run('migrate/up', ['interactive' => (bool)getenv('APP_INTERACTIVE')]);
80
+        $this->run('migrate/up', [ 'interactive' => (bool) getenv('APP_INTERACTIVE') ]);
81 81
 
82 82
         $this->stdout("\nUser\n");
83 83
         $this->stdout("----\n");
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 'default' => getenv('APP_ADMIN_PASSWORD') ?: \Yii::$app->security->generateRandomString(8),
88 88
             ]
89 89
         );
90
-        $this->run('user/create', [getenv('APP_ADMIN_EMAIL'), 'admin', $adminPassword]);
90
+        $this->run('user/create', [ getenv('APP_ADMIN_EMAIL'), 'admin', $adminPassword ]);
91 91
 
92 92
         $this->stdout("\n\nDone.\n");
93 93
     }
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
         $this->stdout("\nCleanup\n");
101 101
         $this->stdout("-------\n");
102 102
         $this->run('cache/flush-all');
103
-        $this->run('audit/cleanup', ['age' => 30, 'interactive' => (bool)getenv('APP_INTERACTIVE')]);
104
-        $this->run('app/clear-assets', ['interactive' => (bool)getenv('APP_INTERACTIVE')]);
103
+        $this->run('audit/cleanup', [ 'age' => 30, 'interactive' => (bool) getenv('APP_INTERACTIVE') ]);
104
+        $this->run('app/clear-assets', [ 'interactive' => (bool) getenv('APP_INTERACTIVE') ]);
105 105
     }
106 106
 
107 107
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $command = new Command($cmd);
122 122
 
123 123
         // Prompt user
124
-        $delete = $this->confirm("\nDo you really want to delete web assets?", ['default' => true]);
124
+        $delete = $this->confirm("\nDo you really want to delete web assets?", [ 'default' => true ]);
125 125
 
126 126
         if ($delete) {
127 127
             // Try to execute $command
Please login to merge, or discard this patch.
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/config/common.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $languages = explode(',', getenv('APP_LANGUAGES'));
14 14
 
15 15
 // prepare asset bundle config
16
-$bundles = [];
16
+$bundles = [ ];
17 17
 if (getenv('APP_ASSET_USE_BUNDLED')) {
18 18
     $bundles = include Yii::getAlias('@web/bundles').'/config.php';
19 19
 }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 return [
37 37
     'id' => 'app',
38 38
     'name' => getenv('APP_TITLE'),
39
-    'language' => $languages[0],
39
+    'language' => $languages[ 0 ],
40 40
     'basePath' => realpath(__DIR__.'/..'),
41 41
     'vendorPath' => '@app/../vendor',
42 42
     'runtimePath' => '@app/../runtime',
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     ],
52 52
     'params' => [
53 53
         'adminEmail' => getenv('APP_ADMIN_EMAIL'),
54
-        'context.menuItems' => [],
54
+        'context.menuItems' => [ ],
55 55
         'yii.migrations' => [
56 56
             getenv('APP_MIGRATION_LOOKUP'),
57 57
             '@yii/rbac/migrations',
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         ],
77 77
         'authManager' => [
78 78
             'class' => 'dektrium\rbac\components\DbManager',
79
-            'defaultRoles' => ['Default'],
79
+            'defaultRoles' => [ 'Default' ],
80 80
         ],
81 81
         'cache' => [
82 82
             'class' => 'yii\redis\Cache',
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
                 [
121 121
                     'class' => 'codemix\streamlog\Target',
122 122
                     'url' => 'php://stderr',
123
-                    'levels' => ['error', 'warning'],
124
-                    'logVars' => [],
123
+                    'levels' => [ 'error', 'warning' ],
124
+                    'logVars' => [ ],
125 125
                     'replaceNewline' => ''
126 126
                 ],
127 127
             ],
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
         'user' => [
152 152
             'class' => 'dmstr\web\User',
153 153
             'enableAutoLogin' => true,
154
-            'loginUrl' => ['/user/security/login'],
154
+            'loginUrl' => [ '/user/security/login' ],
155 155
             'identityClass' => 'dektrium\user\models\User',
156
-            'rootUsers' => ['admin'],
156
+            'rootUsers' => [ 'admin' ],
157 157
         ],
158 158
         'urlManager' => [
159 159
             'class' => 'codemix\localeurls\UrlManager',
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             'showScriptName' => false,
162 162
             'enableDefaultLanguageUrlCode' => true,
163 163
             'baseUrl' => '/',
164
-            'rules' => [],
164
+            'rules' => [ ],
165 165
             'ignoreLanguageUrlPatterns' => [
166 166
                 // route pattern => url pattern
167 167
                 '#^filefly/api#' => '#^filefly/api#',
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
                         'auto_reload' => true,
179 179
                     ],
180 180
                     'globals' => [
181
-                        'html' => ['class'=>'\yii\helpers\Html'],
182
-                        'Tree' => ['class'=>'\dmstr\modules\pages\models\Tree'],
183
-                        'FA' => ['class'=>'\rmrevin\yii\fontawesome\FA'],
184
-                        'Url' => ['class'=>'\hrzg\filemanager\helpers\Url'],
181
+                        'html' => [ 'class'=>'\yii\helpers\Html' ],
182
+                        'Tree' => [ 'class'=>'\dmstr\modules\pages\models\Tree' ],
183
+                        'FA' => [ 'class'=>'\rmrevin\yii\fontawesome\FA' ],
184
+                        'Url' => [ 'class'=>'\hrzg\filemanager\helpers\Url' ],
185 185
                     ],
186 186
                     'uses' => [
187 187
                         'yii\bootstrap',
@@ -200,15 +200,15 @@  discard block
 block discarded – undo
200 200
                 'audit/trail',
201 201
                 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings
202 202
                 // These provide special functionality and get loaded to activate it
203
-                'audit/error',      // Links the extra error reporting functions (`exception()` and `errorMessage()`)
204
-                'audit/extra',      // Links the data functions (`data()`)
205
-                'audit/curl',       // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`)
203
+                'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`)
204
+                'audit/extra', // Links the data functions (`data()`)
205
+                'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`)
206 206
                 //'audit/db',
207 207
                 //'audit/log',
208 208
                 //'audit/profiling',
209 209
             ],
210 210
             'ignoreActions' => [
211
-                (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*':'_'),
211
+                (getenv('APP_AUDIT_DISABLE_ALL_ACTIONS') ? '*' : '_'),
212 212
                 'app/*',
213 213
                 'audit/*',
214 214
                 'help/*',
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
             'class' => 'lajax\translatemanager\Module',
264 264
             'root' => '@app/views',
265 265
             'layout' => '@backend/views/layouts/box',
266
-            'allowedIPs' => ['*'],
267
-            'roles' => ['translate-module'],
266
+            'allowedIPs' => [ '*' ],
267
+            'roles' => [ 'translate-module' ],
268 268
         ],
269 269
         'user' => [
270 270
             'class' => 'dektrium\user\Module',
Please login to merge, or discard this patch.
src/views/layouts/main.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,22 +31,22 @@  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
 
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
 
48 48
 if ($favicon = \Yii::$app->settings->get('faviconPng', 'app.assets', null)) {
49
-    $this->registerLinkTag(['rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon]);
49
+    $this->registerLinkTag([ 'rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon ]);
50 50
 }
51 51
 
52 52
 ?>
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
     'linkSelector' => '.frontend-reload',
74 74
 ]) ?>
75 75
 
76
-<?= TwigWidget::widget(['key' => '_top', 'renderEmpty' => false]) ?>
76
+<?= TwigWidget::widget([ 'key' => '_top', 'renderEmpty' => false ]) ?>
77 77
 
78 78
 <!-- Navbar -->
79 79
 <?php
80 80
 if (Yii::$app->settings->get('enableTwigNavbar', 'app.layout', false)) {
81
-    echo \dmstr\modules\prototype\widgets\TwigWidget::widget(['key' => '_navbar']);
81
+    echo \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'key' => '_navbar' ]);
82 82
 } else {
83 83
     echo $this->render('_navbar');
84 84
 }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 <!-- Footer -->
96 96
 <footer class="footer">
97
-    <?= Cell::widget(['id' => '_footer', 'requestParam' => '_global']) ?>
97
+    <?= Cell::widget([ 'id' => '_footer', 'requestParam' => '_global' ]) ?>
98 98
 </footer>
99 99
 
100 100
 <!-- Info Modal -->
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         <?= Html::a(
104 104
             '<i class="fa fa-heartbeat"></i>',
105 105
             '#',
106
-            ['class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal']
106
+            [ 'class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal' ]
107 107
         ) ?>
108 108
     </p>
109 109
 </div>
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.