@@ -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); |
@@ -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); |
@@ -21,12 +21,12 @@ |
||
| 21 | 21 | \yii\bootstrap\BootstrapAsset::register($this); |
| 22 | 22 | |
| 23 | 23 | $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 | |
| 28 | 28 | echo $form->field($model, 'contacts') |
| 29 | - ->textInput(['placeholder' => $model->getAttributeLabel('contacts')]) |
|
| 29 | + ->textInput([ 'placeholder' => $model->getAttributeLabel('contacts') ]) |
|
| 30 | 30 | ->label(false); |
| 31 | 31 | |
| 32 | 32 | echo Html::submitButton(Yii::t('front/newsletter', 'Subscribe'), [ |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * @var array |
| 40 | 40 | */ |
| 41 | - private $_errors = []; |
|
| 41 | + private $_errors = [ ]; |
|
| 42 | 42 | /** |
| 43 | 43 | * @var NewsletterClient |
| 44 | 44 | */ |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public function getDataProvider() |
| 90 | 90 | { |
| 91 | 91 | return new ActiveDataProvider([ |
| 92 | - 'query' => NewsletterClient::find()->orderBy(['created_at' => SORT_ASC]), |
|
| 92 | + 'query' => NewsletterClient::find()->orderBy([ 'created_at' => SORT_ASC ]), |
|
| 93 | 93 | 'db' => $this->db, |
| 94 | 94 | ]); |
| 95 | 95 | } |