@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return [ |
21 | 21 | [ |
22 | - ['id'], |
|
22 | + [ 'id' ], |
|
23 | 23 | 'integer', |
24 | 24 | ], |
25 | 25 | [ |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return [ |
21 | 21 | [ |
22 | - ['id'], |
|
22 | + [ 'id' ], |
|
23 | 23 | 'integer', |
24 | 24 | ], |
25 | 25 | [ |
@@ -69,7 +69,7 @@ |
||
69 | 69 | if ($this->validate()) { |
70 | 70 | Yii::$app->mailer->compose() |
71 | 71 | ->setTo($email) |
72 | - ->setFrom([$this->email => $this->name]) |
|
72 | + ->setFrom([ $this->email => $this->name ]) |
|
73 | 73 | ->setSubject($this->subject) |
74 | 74 | ->setTextBody($this->body) |
75 | 75 | ->send(); |
@@ -76,18 +76,18 @@ |
||
76 | 76 | 'max' => 255, |
77 | 77 | ], |
78 | 78 | [ |
79 | - ['pages_id'], |
|
79 | + [ 'pages_id' ], |
|
80 | 80 | 'exist', |
81 | 81 | 'skipOnError' => true, |
82 | 82 | 'targetClass' => Page::class, |
83 | - 'targetAttribute' => ['pages_id' => 'id'], |
|
83 | + 'targetAttribute' => [ 'pages_id' => 'id' ], |
|
84 | 84 | ], |
85 | 85 | [ |
86 | - ['language_id'], |
|
86 | + [ 'language_id' ], |
|
87 | 87 | 'exist', |
88 | 88 | 'skipOnError' => true, |
89 | 89 | 'targetClass' => Language::class, |
90 | - 'targetAttribute' => ['language_id' => 'id'], |
|
90 | + 'targetAttribute' => [ 'language_id' => 'id' ], |
|
91 | 91 | ], |
92 | 92 | ]; |
93 | 93 | } |
@@ -174,8 +174,8 @@ |
||
174 | 174 | if ($this->save()) { |
175 | 175 | Yii::$app->mailer->compose() |
176 | 176 | ->setTo($email) |
177 | - ->setFrom([$this->email => $this->name]) |
|
178 | - ->setSubject('New message from bizness-develop feedback. ' . $this->subject) |
|
177 | + ->setFrom([ $this->email => $this->name ]) |
|
178 | + ->setSubject('New message from bizness-develop feedback. '.$this->subject) |
|
179 | 179 | ->setTextBody($this->message) |
180 | 180 | ->send(); |
181 | 181 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function afterSave($insert, $changedAttributes) |
30 | 30 | { |
31 | - $this->linkWithAbout(empty($this->about) ? [] : $this->about); |
|
31 | + $this->linkWithAbout(empty($this->about) ? [ ] : $this->about); |
|
32 | 32 | |
33 | 33 | parent::afterSave($insert, $changedAttributes); |
34 | 34 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'language_id' |
82 | 82 | ], |
83 | 83 | 'unique', |
84 | - 'targetAttribute' => ['about_id', 'language_id'] |
|
84 | + 'targetAttribute' => [ 'about_id', 'language_id' ] |
|
85 | 85 | ], |
86 | 86 | [ |
87 | 87 | [ |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'exist', |
91 | 91 | 'skipOnError' => true, |
92 | 92 | 'targetClass' => About::class, |
93 | - 'targetAttribute' => ['about_id' => 'id'] |
|
93 | + 'targetAttribute' => [ 'about_id' => 'id' ] |
|
94 | 94 | ], |
95 | 95 | [ |
96 | 96 | [ |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | 'exist', |
100 | 100 | 'skipOnError' => true, |
101 | 101 | 'targetClass' => Language::class, |
102 | - 'targetAttribute' => ['language_id' => 'id'] |
|
102 | + 'targetAttribute' => [ 'language_id' => 'id' ] |
|
103 | 103 | ], |
104 | 104 | ]; |
105 | 105 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return [ |
21 | 21 | [ |
22 | - ['id'], |
|
22 | + [ 'id' ], |
|
23 | 23 | 'integer', |
24 | 24 | ], |
25 | 25 | [ |
@@ -78,8 +78,8 @@ discard block |
||
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 |
||
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 |