@@ -72,7 +72,7 @@ |
||
72 | 72 | 'title', |
73 | 73 | 'unique', |
74 | 74 | 'skipOnError' => true, |
75 | - 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != '.$this->id : '' |
|
75 | + 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != ' . $this->id : '' |
|
76 | 76 | ], |
77 | 77 | [ |
78 | 78 | [ |
@@ -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(); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return [ |
21 | 21 | [ |
22 | - ['id'], |
|
22 | + [ 'id' ], |
|
23 | 23 | 'integer', |
24 | 24 | ], |
25 | 25 | [ |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function behaviors() |
24 | 24 | { |
25 | 25 | $behaviors = parent::behaviors(); |
26 | - $behaviors[] = [ |
|
26 | + $behaviors[ ] = [ |
|
27 | 27 | 'class' => TimestampBehavior::class, |
28 | 28 | 'createdAtAttribute' => 'created_at', |
29 | 29 | 'updatedAtAttribute' => 'updated_at', |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | /** |
49 | 49 | * @var array |
50 | 50 | */ |
51 | - public $albums = []; |
|
51 | + public $albums = [ ]; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * Initialize. |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | 'exist', |
123 | 123 | 'skipOnError' => true, |
124 | 124 | 'targetClass' => Page::class, |
125 | - 'targetAttribute' => ['pageId' => 'id'] |
|
125 | + 'targetAttribute' => [ 'pageId' => 'id' ] |
|
126 | 126 | ], |
127 | 127 | [ |
128 | 128 | UploadModelInterface::FILE_TYPE_THUMB, |
129 | - function($attribute){ |
|
130 | - if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){ |
|
129 | + function($attribute) { |
|
130 | + if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) { |
|
131 | 131 | $this->addError($attribute, 'Tumbnail content must be a numeric or string.'); |
132 | 132 | } |
133 | 133 | }, |
@@ -145,13 +145,13 @@ discard block |
||
145 | 145 | [ |
146 | 146 | 'albums', |
147 | 147 | 'each', |
148 | - 'rule' => ['integer'], |
|
148 | + 'rule' => [ 'integer' ], |
|
149 | 149 | ], |
150 | 150 | [ |
151 | 151 | 'title', |
152 | 152 | 'unique', |
153 | 153 | 'skipOnError' => true, |
154 | - 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != '.$this->id : '' |
|
154 | + 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != ' . $this->id : '' |
|
155 | 155 | ], |
156 | 156 | [ |
157 | 157 | [ |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return [ |
21 | 21 | [ |
22 | - ['id'], |
|
22 | + [ 'id' ], |
|
23 | 23 | 'integer', |
24 | 24 | ], |
25 | 25 | [ |
@@ -147,7 +147,7 @@ |
||
147 | 147 | * |
148 | 148 | * @return array |
149 | 149 | */ |
150 | - public function attributeLabels(){ |
|
150 | + public function attributeLabels() { |
|
151 | 151 | |
152 | 152 | return[ |
153 | 153 | 'first_name' => 'First name', |
@@ -1,7 +1,7 @@ |
||
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 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | /* @var $model About */ |
5 | 5 | |
6 | -$this->params['breadcrumbs'][] = $model->title; |
|
6 | +$this->params[ 'breadcrumbs' ][ ] = $model->title; |
|
7 | 7 | ?> |
8 | 8 | |
9 | 9 | <section class="inform_block"> |