Passed
Push — master ( 2de20e...5ce583 )
by Andrey
04:00
created
controllers/admin/AboutController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $about = About::findOne($aboutId);
41 41
 
42 42
         if (null === $about) {
43
-            throw  new NotFoundHttpException('Record with id ' . $aboutId . ' does not exist');
43
+            throw  new NotFoundHttpException('Record with id '.$aboutId.' does not exist');
44 44
         }
45 45
 
46 46
         $about->default = 1;
Please login to merge, or discard this patch.
controllers/BaseController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function beforeAction($action)
33 33
     {
34
-        $this->view->params['pages'] = Page::getActiveMenu();
35
-        $this->view->params['contacts'] = Contact::getDefaultContacts();
36
-        $this->view->params['controllerId'] = Yii::$app->controller->id;
34
+        $this->view->params[ 'pages' ] = Page::getActiveMenu();
35
+        $this->view->params[ 'contacts' ] = Contact::getDefaultContacts();
36
+        $this->view->params[ 'controllerId' ] = Yii::$app->controller->id;
37 37
 
38 38
         return parent::beforeAction($action);
39 39
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $this->view->registerLinkTag([
75 75
                 'rel' => 'alternate',
76 76
                 'hreflang' => $shortName,
77
-                'href' => rtrim(Yii::$app->request->hostInfo, '/') .
77
+                'href' => rtrim(Yii::$app->request->hostInfo, '/').
78 78
                     BaseHelper::getSwitchLanguageLink($shortName, Yii::$app->request)
79 79
             ]);
80 80
         }
Please login to merge, or discard this patch.
controllers/ContactController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
                 'rules' => [
27 27
                     [
28 28
                         'allow' => true,
29
-                        'actions' => ['index', 'captcha'],
30
-                        'roles' => ['?', '@'],
29
+                        'actions' => [ 'index', 'captcha' ],
30
+                        'roles' => [ '?', '@' ],
31 31
                     ],
32 32
                 ],
33 33
             ],
34 34
             'verbs' => [
35 35
                 'class' => VerbFilter::class,
36 36
                 'actions' => [
37
-                    'index' => ['get', 'post'],
38
-                    'captcha' => ['get'],
37
+                    'index' => [ 'get', 'post' ],
38
+                    'captcha' => [ 'get' ],
39 39
                 ],
40 40
             ],
41 41
         ]);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $feedback = new Feedback();
64 64
         $feedback->setScenario(Feedback::SCENARIO_CONTACT);
65 65
 
66
-        if ($feedback->load(Yii::$app->request->post()) && $feedback->contact(Yii::$app->params['adminEmail'])) {
66
+        if ($feedback->load(Yii::$app->request->post()) && $feedback->contact(Yii::$app->params[ 'adminEmail' ])) {
67 67
 
68 68
             Yii::$app->session->setFlash('contactFormSubmitted');
69 69
 
Please login to merge, or discard this patch.
controllers/SiteController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
                 'rules' => [
27 27
                     [
28 28
                         'allow'   => true,
29
-                        'actions' => ['reg', 'login', 'captcha'],
30
-                        'roles'   => ['?'],
29
+                        'actions' => [ 'reg', 'login', 'captcha' ],
30
+                        'roles'   => [ '?' ],
31 31
                     ],
32 32
                     [
33 33
                         'allow' => true,
34
-                        'actions' => ['logout'],
35
-                        'roles' => ['@'],
34
+                        'actions' => [ 'logout' ],
35
+                        'roles' => [ '@' ],
36 36
                     ],
37 37
                 ],
38 38
             ],
Please login to merge, or discard this patch.
controllers/AboutController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
                 'rules' => [
25 25
                     [
26 26
                         'allow' => true,
27
-                        'actions' => ['index'],
28
-                        'roles' => ['?', '@'],
27
+                        'actions' => [ 'index' ],
28
+                        'roles' => [ '?', '@' ],
29 29
                     ],
30 30
                 ],
31 31
             ],
32 32
             'verbs' => [
33 33
                 'class' => VerbFilter::class,
34 34
                 'actions' => [
35
-                    'index' => ['get'],
35
+                    'index' => [ 'get' ],
36 36
                 ],
37 37
             ],
38 38
         ]);
Please login to merge, or discard this patch.
web/index-test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // NOTE: Make sure this file is not accessible when deployed to production
4
-if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
4
+if (!in_array(@$_SERVER[ 'REMOTE_ADDR' ], [ '127.0.0.1', '::1' ])) {
5 5
     die('You are not allowed to access this file.');
6 6
 }
7 7
 
8 8
 defined('YII_DEBUG') or define('YII_DEBUG', true);
9 9
 defined('YII_ENV') or define('YII_ENV', 'test');
10 10
 
11
-require __DIR__ . '/../vendor/autoload.php';
12
-require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
11
+require __DIR__.'/../vendor/autoload.php';
12
+require __DIR__.'/../vendor/yiisoft/yii2/Yii.php';
13 13
 
14
-$config = require __DIR__ . '/../config/test.php';
14
+$config = require __DIR__.'/../config/test.php';
15 15
 
16 16
 (new yii\web\Application($config))->run();
Please login to merge, or discard this patch.
web/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,16 +9,16 @@
 block discarded – undo
9 9
 defined('YII_DEBUG') or define('YII_DEBUG', true);
10 10
 defined('YII_ENV') or define('YII_ENV', 'dev');
11 11
 
12
-require __DIR__ . '/../vendor/autoload.php';
13
-require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
12
+require __DIR__.'/../vendor/autoload.php';
13
+require __DIR__.'/../vendor/yiisoft/yii2/Yii.php';
14 14
 
15 15
 Yii::setAlias('@app', dirname(__DIR__));
16 16
 Yii::setAlias('@admin', AdminModule::getBaseDir());
17 17
 Yii::setAlias('@rbac', RbacModule::getBaseDir());
18 18
 Yii::setAlias('@mfuploader', MFUModule::getBaseDir());
19 19
 
20
-$webConfig = require __DIR__ . '/../config/web.php';
21
-$adminConfig = require __DIR__ . '/../config/admin/admin.php';
20
+$webConfig = require __DIR__.'/../config/web.php';
21
+$adminConfig = require __DIR__.'/../config/admin/admin.php';
22 22
 
23 23
 $config = ArrayHelper::merge($webConfig, $adminConfig);
24 24
 
Please login to merge, or discard this patch.
views/admin/products/MultiLevelMenu/search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,4 +16,4 @@
 block discarded – undo
16 16
     'uncheck' => false,
17 17
     'onMouseDown' => 'this.isChecked=this.checked;',
18 18
     'onClick' => 'this.checked=!this.isChecked;',
19
-]);  ?>
19
+]); ?>
Please login to merge, or discard this patch.
models/Quality.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
      */
141 141
     public function afterSave($insert, $changedAttributes)
142 142
     {
143
-        $this->linkWithAbout(empty($this->about) ? [] : $this->about);
143
+        $this->linkWithAbout(empty($this->about) ? [ ] : $this->about);
144 144
 
145 145
         parent::afterSave($insert, $changedAttributes);
146 146
     }
Please login to merge, or discard this patch.