Passed
Push — master ( fe7b3f...22651e )
by Andrey
08:30
created
config/admin/admin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
                 'home' => HomeController::class,
61 61
                 'sitemap' => SitemapController::class
62 62
             ],
63
-            'accessRoles' => ['admin', 'manager'],
63
+            'accessRoles' => [ 'admin', 'manager' ],
64 64
             'components' => [
65
-                'view' => require __DIR__ . '/view-component.php',
66
-                'multilanguage-validate-component' => require __DIR__ .'/multilanguage-validate-component.php',
65
+                'view' => require __DIR__.'/view-component.php',
66
+                'multilanguage-validate-component' => require __DIR__.'/multilanguage-validate-component.php',
67 67
             ],
68 68
             'isMultilanguage' => true,
69 69
         ],
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
                 'permissions' => PermissionController::class,
76 76
                 'profiles' => ProfileController::class
77 77
             ],
78
-            'accessRoles' => ['admin', 'manager'],
78
+            'accessRoles' => [ 'admin', 'manager' ],
79 79
             'components' => [
80
-                'view' => require __DIR__ . '/view-component.php',
80
+                'view' => require __DIR__.'/view-component.php',
81 81
             ],
82 82
         ],
83 83
         'mfuploader' => [
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
                 'text-album' => TextAlbumController::class,
95 95
                 'other-album' => OtherAlbumController::class,
96 96
             ],
97
-            'accessRoles' => ['admin', 'manager'],
97
+            'accessRoles' => [ 'admin', 'manager' ],
98 98
             'defaultStorageType' => MFUModule::STORAGE_TYPE_LOCAL,
99
-            'previewOptions' => require __DIR__ . '/../preview-options.php',
99
+            'previewOptions' => require __DIR__.'/../preview-options.php',
100 100
             'components' => [
101 101
                 'local-upload-component' => [
102 102
                     'class' => LocalUploadComponent::class,
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
                 's3-upload-component' => [
106 106
                     'class' => S3UploadComponent::class,
107 107
                     'checkExtensionByMimeType' => false,
108
-                    'credentials' => require __DIR__ . '/../aws-credentials.php',
108
+                    'credentials' => require __DIR__.'/../aws-credentials.php',
109 109
                     'region' => 'us-west-2',
110 110
                     's3DefaultBucket' => 'filesmodule2',
111 111
                 ],
112
-                'view' => require __DIR__ . '/view-component.php',
112
+                'view' => require __DIR__.'/view-component.php',
113 113
             ],
114 114
         ]
115 115
     ],
Please login to merge, or discard this patch.
config/admin/main-menu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Itstructure\AdminModule\Module as AdminModule;
4 4
 use Itstructure\RbacModule\Module as RbacModule;
5 5
 
6
-$shortLanguage = $this->view->params['shortLanguage'];
6
+$shortLanguage = $this->view->params[ 'shortLanguage' ];
7 7
 $controllerId = Yii::$app->controller->id;
8 8
 
9 9
 return [
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     'active' => $controllerId == 'profiles' ? true : false
51 51
                 ],
52 52
             ],
53
-            'active' => in_array($controllerId, ['roles', 'permissions', 'profiles']) ? true : false
53
+            'active' => in_array($controllerId, [ 'roles', 'permissions', 'profiles' ]) ? true : false
54 54
         ],
55 55
         'positions' => [
56 56
             'title' => Yii::t('positions', 'Positions'),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                     'active' => $controllerId == 'qualities' ? true : false
101 101
                 ],
102 102
             ],
103
-            'active' => in_array($controllerId, ['about', 'technologies', 'qualities']) ? true : false
103
+            'active' => in_array($controllerId, [ 'about', 'technologies', 'qualities' ]) ? true : false
104 104
         ],
105 105
         'contacts' => [
106 106
             'title' => Yii::t('contacts', 'Contacts'),
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                     'active' => $controllerId == 'social' ? true : false
121 121
                 ],
122 122
             ],
123
-            'active' => in_array($controllerId, ['contacts', 'social']) ? true : false
123
+            'active' => in_array($controllerId, [ 'contacts', 'social' ]) ? true : false
124 124
         ],
125 125
         'home' => [
126 126
             'title' => Yii::t('home', 'Home page'),
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     'active' => $controllerId == 'other-album' ? true : false
171 171
                 ],
172 172
             ],
173
-            'active' => in_array($controllerId, ['image-album', 'audio-album', 'video-album', 'application-album', 'text-album', 'other-album']) ? true : false
173
+            'active' => in_array($controllerId, [ 'image-album', 'audio-album', 'video-album', 'application-album', 'text-album', 'other-album' ]) ? true : false
174 174
         ],
175 175
         'sitemap' => [
176 176
             'title' => Yii::t('app', 'Sitemap'),
Please login to merge, or discard this patch.
config/preview-options.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
 return [
7 7
     UploadModelInterface::FILE_TYPE_APP => [
8
-        'existing' => function (Mediafile $mediafile) {
8
+        'existing' => function(Mediafile $mediafile) {
9 9
             return [
10 10
                 'externalTag' => [
11 11
                     'name' => 'a',
Please login to merge, or discard this patch.
config/web.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$params = require __DIR__ . '/params.php';
4
-$db = require __DIR__ . '/db.php';
3
+$params = require __DIR__.'/params.php';
4
+$db = require __DIR__.'/db.php';
5 5
 
6 6
 $config = [
7 7
     'id' => 'yii2_template_multilanguage',
8 8
     'version' => '1.1.0',
9 9
     'basePath' => dirname(__DIR__),
10 10
     'homeUrl' => YII_DEBUG ? 'http://yii2-template-multilanguage' : 'http://yii2-template-multilanguage',
11
-    'bootstrap' => ['log'],
11
+    'bootstrap' => [ 'log' ],
12 12
     'language' => 'en-US',
13 13
     'aliases' => [
14 14
         '@bower' => '@vendor/bower-asset',
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             'targets' => [
51 51
                 [
52 52
                     'class' => 'yii\log\FileTarget',
53
-                    'levels' => ['error', 'warning'],
53
+                    'levels' => [ 'error', 'warning' ],
54 54
                 ],
55 55
             ],
56 56
         ],
@@ -209,18 +209,18 @@  discard block
 block discarded – undo
209 209
 
210 210
 if (YII_ENV_DEV) {
211 211
     // configuration adjustments for 'dev' environment
212
-    $config['bootstrap'][] = 'debug';
213
-    $config['modules']['debug'] = [
212
+    $config[ 'bootstrap' ][ ] = 'debug';
213
+    $config[ 'modules' ][ 'debug' ] = [
214 214
         'class' => 'yii\debug\Module',
215 215
         // uncomment the following to add your IP if you are not connecting from localhost.
216
-        'allowedIPs' => ['127.0.0.1', '::1', '*'],
216
+        'allowedIPs' => [ '127.0.0.1', '::1', '*' ],
217 217
     ];
218 218
 
219
-    $config['bootstrap'][] = 'gii';
220
-    $config['modules']['gii'] = [
219
+    $config[ 'bootstrap' ][ ] = 'gii';
220
+    $config[ 'modules' ][ 'gii' ] = [
221 221
         'class' => 'yii\gii\Module',
222 222
         // uncomment the following to add your IP if you are not connecting from localhost.
223
-        'allowedIPs' => ['127.0.0.1', '::1', '*'],
223
+        'allowedIPs' => [ '127.0.0.1', '::1', '*' ],
224 224
     ];
225 225
 }
226 226
 
Please login to merge, or discard this patch.
controllers/admin/ProductController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
     protected function getAdditionFields(): array
100 100
     {
101 101
         if ($this->action->id == 'create' || $this->action->id == 'update') {
102
-            $fields = [];
102
+            $fields = [ ];
103 103
 
104
-            $fields['pages'] = Page::getMenu();
105
-            $fields['albums'] = Album::find()->select([
104
+            $fields[ 'pages' ] = Page::getMenu();
105
+            $fields[ 'albums' ] = Album::find()->select([
106 106
                 'id', 'title'
107 107
             ])->all();
108 108
 
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
                     'defaultPageSize' => 6,
117 117
                     'totalCount' => $mediafilesQuery->count()
118 118
                 ]);
119
-                $fields['images'] = $mediafilesQuery->offset($media_pages->offset)
119
+                $fields[ 'images' ] = $mediafilesQuery->offset($media_pages->offset)
120 120
                     ->limit($media_pages->limit)
121 121
                     ->all();
122
-                $fields['media_pages'] = $media_pages;
122
+                $fields[ 'media_pages' ] = $media_pages;
123 123
             }
124 124
 
125 125
             return $fields;
Please login to merge, or discard this patch.