@@ -18,7 +18,7 @@ |
||
| 18 | 18 | <?= GridView::widget([ |
| 19 | 19 | 'dataProvider' => $dataProvider, |
| 20 | 20 | 'columns' => [ |
| 21 | - ['class' => SerialColumn::class], |
|
| 21 | + [ 'class' => SerialColumn::class ], |
|
| 22 | 22 | 'contacts', |
| 23 | 23 | 'created_at:datetime', |
| 24 | 24 | ], |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | /** |
| 33 | 33 | * @inheritdoc |
| 34 | 34 | */ |
| 35 | - public function __construct($id, $module, ServiceInterface $service, $config = []) |
|
| 35 | + public function __construct($id, $module, ServiceInterface $service, $config = [ ]) |
|
| 36 | 36 | { |
| 37 | 37 | $this->_service = $service; |
| 38 | 38 | parent::__construct($id, $module, $config); |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | \yii\bootstrap\BootstrapAsset::register($this); |
| 22 | 22 | ?> |
| 23 | 23 | <?php $form = ActiveForm::begin([ |
| 24 | - 'action' => ['/newsletter/default/subscribe'], |
|
| 25 | - 'options' => ['class' => 'form-inline'], |
|
| 24 | + 'action' => [ '/newsletter/default/subscribe' ], |
|
| 25 | + 'options' => [ 'class' => 'form-inline' ], |
|
| 26 | 26 | ]) ?> |
| 27 | 27 | <?= $form->field($model, 'contacts') |
| 28 | - ->textInput(['placeholder' => $model->getAttributeLabel('contacts')]) |
|
| 28 | + ->textInput([ 'placeholder' => $model->getAttributeLabel('contacts') ]) |
|
| 29 | 29 | ->label(false) ?> |
| 30 | 30 | <?= Html::submitButton(Yii::t('front/newsletter', 'Subscribe'), [ |
| 31 | 31 | 'class' => 'btn btn-success', |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function behaviors() |
| 26 | 26 | { |
| 27 | - return [ |
|
| 28 | - 'verbs' => [ |
|
| 29 | - 'class' => VerbFilter::class, |
|
| 30 | - 'actions' => [ |
|
| 31 | - 'subscribe' => ['post'], |
|
| 32 | - ], |
|
| 33 | - ], |
|
| 34 | - ]; |
|
| 27 | + return [ |
|
| 28 | + 'verbs' => [ |
|
| 29 | + 'class' => VerbFilter::class, |
|
| 30 | + 'actions' => [ |
|
| 31 | + 'subscribe' => ['post'], |
|
| 32 | + ], |
|
| 33 | + ], |
|
| 34 | + ]; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'verbs' => [ |
| 29 | 29 | 'class' => VerbFilter::class, |
| 30 | 30 | 'actions' => [ |
| 31 | - 'subscribe' => ['post'], |
|
| 31 | + 'subscribe' => [ 'post' ], |
|
| 32 | 32 | ], |
| 33 | 33 | ], |
| 34 | 34 | ]; |
@@ -50,11 +50,11 @@ |
||
| 50 | 50 | public function rules() |
| 51 | 51 | { |
| 52 | 52 | return [ |
| 53 | - ['contacts', 'required'], |
|
| 54 | - ['contacts', 'string', 'max' => 255], |
|
| 55 | - ['contacts', 'email', 'on' => self::SCENARIO_CONTACTS_EMAIL], |
|
| 53 | + [ 'contacts', 'required' ], |
|
| 54 | + [ 'contacts', 'string', 'max' => 255 ], |
|
| 55 | + [ 'contacts', 'email', 'on' => self::SCENARIO_CONTACTS_EMAIL ], |
|
| 56 | 56 | |
| 57 | - [['created_at', 'updated_at'], 'safe'], |
|
| 57 | + [ [ 'created_at', 'updated_at' ], 'safe' ], |
|
| 58 | 58 | ]; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | parent::init(); |
| 46 | 46 | |
| 47 | 47 | if ($this->_service === null) { |
| 48 | - $this->_service = ['class' => DbService::class]; |
|
| 48 | + $this->_service = [ 'class' => DbService::class ]; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | Yii::$container->set(ServiceInterface::class, $this->_service); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | public function getDataProvider() |
| 73 | 73 | { |
| 74 | - $query = NewsletterClient::find()->orderBy(['created_at' => SORT_ASC]); |
|
| 74 | + $query = NewsletterClient::find()->orderBy([ 'created_at' => SORT_ASC ]); |
|
| 75 | 75 | |
| 76 | 76 | return new ActiveDataProvider([ |
| 77 | 77 | 'query' => $query, |