Test Setup Failed
Branch master (193986)
by Andrey
07:40
created
models/sitemap/SitemapContact.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array [langId => langCode]
29 29
      */
30
-    public $sitemapLanguages = [];
30
+    public $sitemapLanguages = [ ];
31 31
     /**
32 32
      * If TRUE - Yii::$app->language will be switched for each sitemapLanguages and restored after.
33 33
      *
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getSitemapAlternateLinks()
115 115
     {
116
-        $buffer = [];
116
+        $buffer = [ ];
117 117
 
118 118
         foreach ($this->sitemapLanguages as $langCode) {
119
-            $buffer[$langCode] = $this->getSitemapLoc($langCode);
119
+            $buffer[ $langCode ] = $this->getSitemapLoc($langCode);
120 120
         }
121 121
 
122 122
         return $buffer;
Please login to merge, or discard this patch.
models/sitemap/SitemapProduct.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array [langId => langCode]
29 29
      */
30
-    public $sitemapLanguages = [];
30
+    public $sitemapLanguages = [ ];
31 31
     /**
32 32
      * If TRUE - Yii::$app->language will be switched for each sitemapLanguages and restored after.
33 33
      *
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         return static::find()
62 62
             ->with([
63
-                'productsLanguages' => function ($query) use ($lang) {
63
+                'productsLanguages' => function($query) use ($lang) {
64 64
                     /** @var \yii\db\Query $query */
65 65
                     $query->andWhere([
66 66
                         'language_id' => Language::findOne([
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getSitemapAlternateLinks()
118 118
     {
119
-        $buffer = [];
119
+        $buffer = [ ];
120 120
 
121 121
         foreach ($this->sitemapLanguages as $langCode) {
122
-            $buffer[$langCode] = $this->getSitemapLoc($langCode);
122
+            $buffer[ $langCode ] = $this->getSitemapLoc($langCode);
123 123
         }
124 124
 
125 125
         return $buffer;
Please login to merge, or discard this patch.
models/sitemap/SitemapHome.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array [langId => langCode]
29 29
      */
30
-    public $sitemapLanguages = [];
30
+    public $sitemapLanguages = [ ];
31 31
     /**
32 32
      * If TRUE - Yii::$app->language will be switched for each sitemapLanguages and restored after.
33 33
      *
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getSitemapAlternateLinks()
115 115
     {
116
-        $buffer = [];
116
+        $buffer = [ ];
117 117
 
118 118
         foreach ($this->sitemapLanguages as $langCode) {
119
-            $buffer[$langCode] = $this->getSitemapLoc($langCode);
119
+            $buffer[ $langCode ] = $this->getSitemapLoc($langCode);
120 120
         }
121 121
 
122 122
         return $buffer;
Please login to merge, or discard this patch.
models/sitemap/SitemapPage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array [langId => langCode]
29 29
      */
30
-    public $sitemapLanguages = [];
30
+    public $sitemapLanguages = [ ];
31 31
     /**
32 32
      * If TRUE - Yii::$app->language will be switched for each sitemapLanguages and restored after.
33 33
      *
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         return static::find()
62 62
             ->with([
63
-                'pagesLanguages' => function ($query) use ($lang) {
63
+                'pagesLanguages' => function($query) use ($lang) {
64 64
                     /** @var \yii\db\Query $query */
65 65
                     $query->andWhere([
66 66
                         'language_id' => Language::findOne([
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getSitemapAlternateLinks()
118 118
     {
119
-        $buffer = [];
119
+        $buffer = [ ];
120 120
 
121 121
         foreach ($this->sitemapLanguages as $langCode) {
122
-            $buffer[$langCode] = $this->getSitemapLoc($langCode);
122
+            $buffer[ $langCode ] = $this->getSitemapLoc($langCode);
123 123
         }
124 124
 
125 125
         return $buffer;
Please login to merge, or discard this patch.
models/AboutSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         return [
21 21
             [
22
-                ['id'],
22
+                [ 'id' ],
23 23
                 'integer',
24 24
             ],
25 25
             [
Please login to merge, or discard this patch.
models/Page.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     /**
43 43
      * @var array
44 44
      */
45
-    public $albums = [];
45
+    public $albums = [ ];
46 46
 
47 47
     /**
48 48
      * @var int
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
             ],
114 114
             [
115 115
                 UploadModelInterface::FILE_TYPE_THUMB,
116
-                function($attribute){
117
-                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){
116
+                function($attribute) {
117
+                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) {
118 118
                         $this->addError($attribute, 'Tumbnail content must be a numeric or string.');
119 119
                     }
120 120
                 },
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
             [
124 124
                 'albums',
125 125
                 'each',
126
-                'rule' => ['integer'],
126
+                'rule' => [ 'integer' ],
127 127
             ],
128 128
             [
129 129
                 'title',
130 130
                 'unique',
131 131
                 'skipOnError'     => true,
132
-                'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != '.$this->id : ''
132
+                'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != ' . $this->id : ''
133 133
             ],
134 134
             [
135 135
                 [
Please login to merge, or discard this patch.
models/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 'exist',
138 138
                 'skipOnError' => true,
139 139
                 'targetClass' => Position::class,
140
-                'targetAttribute' => ['position_id' => 'id']
140
+                'targetAttribute' => [ 'position_id' => 'id' ]
141 141
             ],
142 142
         ];
143 143
     }
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
      */
433 433
     public function moveOrder(int $order): void
434 434
     {
435
-        if ($order == $this->order){
435
+        if ($order == $this->order) {
436 436
             return;
437 437
         }
438 438
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             ])
444 444
             ->one();
445 445
         $future->detachBehavior('mediafile');
446
-        $future->order = $order > $this->order ? $order-1 : $order+1;
446
+        $future->order = $order > $this->order ? $order - 1 : $order + 1;
447 447
         $future->save();
448 448
 
449 449
         $this->detachBehavior('mediafile');
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
      */
459 459
     public function beforeSave($insert)
460 460
     {
461
-        if ($this->isNewRecord){
461
+        if ($this->isNewRecord) {
462 462
             $this->order = $this->maxOrder == null ? 1 : $this->maxOrder + 1;
463 463
         }
464 464
 
Please login to merge, or discard this patch.
models/UserSearch.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
         $dataProvider->setSort([
79 79
             'attributes' => [
80 80
                 'order' => [
81
-                    'asc' => ['order' => SORT_ASC],
82
-                    'desc' => ['order' => SORT_DESC],
81
+                    'asc' => [ 'order' => SORT_ASC ],
82
+                    'desc' => [ 'order' => SORT_DESC ],
83 83
                     'label' => 'Order',
84 84
                     'default' => SORT_ASC
85 85
                 ],
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
             'updated_at' => $this->updated_at,
104 104
         ]);
105 105
 
106
-        $query->andFilterWhere(['like', 'first_name', $this->first_name])
107
-            ->andFilterWhere(['like', 'last_name', $this->last_name])
108
-            ->andFilterWhere(['like', 'patronymic', $this->patronymic])
109
-            ->andFilterWhere(['like', 'position', $this->position])
110
-            ->andFilterWhere(['like', 'login', $this->login])
111
-            ->andFilterWhere(['like', 'email', $this->email])
112
-            ->andFilterWhere(['like', 'phone', $this->phone]);
106
+        $query->andFilterWhere([ 'like', 'first_name', $this->first_name ])
107
+            ->andFilterWhere([ 'like', 'last_name', $this->last_name ])
108
+            ->andFilterWhere([ 'like', 'patronymic', $this->patronymic ])
109
+            ->andFilterWhere([ 'like', 'position', $this->position ])
110
+            ->andFilterWhere([ 'like', 'login', $this->login ])
111
+            ->andFilterWhere([ 'like', 'email', $this->email ])
112
+            ->andFilterWhere([ 'like', 'phone', $this->phone ]);
113 113
 
114 114
         $query->orderBy('order ASC');
115 115
 
Please login to merge, or discard this patch.
models/AboutTechnology.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                     'technologies_id'
50 50
                 ],
51 51
                 'unique',
52
-                'targetAttribute' => ['about_id', 'technologies_id']
52
+                'targetAttribute' => [ 'about_id', 'technologies_id' ]
53 53
             ],
54 54
             [
55 55
                 [
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 'exist',
59 59
                 'skipOnError' => true,
60 60
                 'targetClass' => About::class,
61
-                'targetAttribute' => ['about_id' => 'id']
61
+                'targetAttribute' => [ 'about_id' => 'id' ]
62 62
             ],
63 63
             [
64 64
                 [
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 'exist',
68 68
                 'skipOnError' => true,
69 69
                 'targetClass' => Technology::class,
70
-                'targetAttribute' => ['technologies_id' => 'id']
70
+                'targetAttribute' => [ 'technologies_id' => 'id' ]
71 71
             ],
72 72
         ];
73 73
     }
Please login to merge, or discard this patch.