@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | 'rules' => [ |
26 | 26 | [ |
27 | 27 | 'allow' => true, |
28 | - 'actions' => ['view'], |
|
29 | - 'roles' => ['?', '@'], |
|
28 | + 'actions' => [ 'view' ], |
|
29 | + 'roles' => [ '?', '@' ], |
|
30 | 30 | ], |
31 | 31 | ], |
32 | 32 | ], |
33 | 33 | 'verbs' => [ |
34 | 34 | 'class' => VerbFilter::class, |
35 | 35 | 'actions' => [ |
36 | - 'view' => ['get'], |
|
36 | + 'view' => [ 'get' ], |
|
37 | 37 | ], |
38 | 38 | ], |
39 | 39 | ]); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ])->one(); |
56 | 56 | |
57 | 57 | if (null === $model) { |
58 | - throw new NotFoundHttpException('Product not fount with id = '.$id.'.'); |
|
58 | + throw new NotFoundHttpException('Product not fount with id = ' . $id . '.'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $this->setMetaParams($model); |
@@ -26,13 +26,13 @@ |
||
26 | 26 | 'rules' => [ |
27 | 27 | [ |
28 | 28 | 'allow' => true, |
29 | - 'actions' => ['reg', 'login', 'captcha'], |
|
30 | - 'roles' => ['?'], |
|
29 | + 'actions' => [ 'reg', 'login', 'captcha' ], |
|
30 | + 'roles' => [ '?' ], |
|
31 | 31 | ], |
32 | 32 | [ |
33 | 33 | 'allow' => true, |
34 | - 'actions' => ['logout'], |
|
35 | - 'roles' => ['@'], |
|
34 | + 'actions' => [ 'logout' ], |
|
35 | + 'roles' => [ '@' ], |
|
36 | 36 | ], |
37 | 37 | ], |
38 | 38 | ], |
@@ -24,15 +24,15 @@ |
||
24 | 24 | 'rules' => [ |
25 | 25 | [ |
26 | 26 | 'allow' => true, |
27 | - 'actions' => ['index'], |
|
28 | - 'roles' => ['?', '@'], |
|
27 | + 'actions' => [ 'index' ], |
|
28 | + 'roles' => [ '?', '@' ], |
|
29 | 29 | ], |
30 | 30 | ], |
31 | 31 | ], |
32 | 32 | 'verbs' => [ |
33 | 33 | 'class' => VerbFilter::class, |
34 | 34 | 'actions' => [ |
35 | - 'index' => ['get'], |
|
35 | + 'index' => [ 'get' ], |
|
36 | 36 | ], |
37 | 37 | ], |
38 | 38 | ]); |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | 'rules' => [ |
28 | 28 | [ |
29 | 29 | 'allow' => true, |
30 | - 'actions' => ['view'], |
|
31 | - 'roles' => ['?', '@'], |
|
30 | + 'actions' => [ 'view' ], |
|
31 | + 'roles' => [ '?', '@' ], |
|
32 | 32 | ], |
33 | 33 | ], |
34 | 34 | ], |
35 | 35 | 'verbs' => [ |
36 | 36 | 'class' => VerbFilter::class, |
37 | 37 | 'actions' => [ |
38 | - 'view' => ['get'], |
|
38 | + 'view' => [ 'get' ], |
|
39 | 39 | ], |
40 | 40 | ], |
41 | 41 | ]); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | ])->one(); |
58 | 58 | |
59 | 59 | if (null === $model) { |
60 | - throw new NotFoundHttpException('Page not fount with id = '.$id.'.'); |
|
60 | + throw new NotFoundHttpException('Page not fount with id = ' . $id . '.'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $this->setMetaParams($model); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $pagination = new Pagination([ |
72 | 72 | 'totalCount' => $productsQuery->count(), |
73 | - 'defaultPageSize' => Yii::$app->params['defaultPageSize'] |
|
73 | + 'defaultPageSize' => Yii::$app->params[ 'defaultPageSize' ] |
|
74 | 74 | ]); |
75 | 75 | |
76 | 76 | return $this->render('view', [ |
@@ -26,16 +26,16 @@ discard block |
||
26 | 26 | 'rules' => [ |
27 | 27 | [ |
28 | 28 | 'allow' => true, |
29 | - 'actions' => ['index', 'captcha'], |
|
30 | - 'roles' => ['?', '@'], |
|
29 | + 'actions' => [ 'index', 'captcha' ], |
|
30 | + 'roles' => [ '?', '@' ], |
|
31 | 31 | ], |
32 | 32 | ], |
33 | 33 | ], |
34 | 34 | 'verbs' => [ |
35 | 35 | 'class' => VerbFilter::class, |
36 | 36 | 'actions' => [ |
37 | - 'index' => ['get', 'post'], |
|
38 | - 'captcha' => ['get'], |
|
37 | + 'index' => [ 'get', 'post' ], |
|
38 | + 'captcha' => [ 'get' ], |
|
39 | 39 | ], |
40 | 40 | ], |
41 | 41 | ]); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $feedback = new Feedback(); |
64 | 64 | $feedback->setScenario(Feedback::SCENARIO_CONTACT); |
65 | 65 | |
66 | - if ($feedback->load(Yii::$app->request->post()) && $feedback->contact(Yii::$app->params['adminEmail'])) { |
|
66 | + if ($feedback->load(Yii::$app->request->post()) && $feedback->contact(Yii::$app->params[ 'adminEmail' ])) { |
|
67 | 67 | |
68 | 68 | Yii::$app->session->setFlash('contactFormSubmitted'); |
69 | 69 |
@@ -26,9 +26,9 @@ |
||
26 | 26 | */ |
27 | 27 | public function beforeAction($action) |
28 | 28 | { |
29 | - $this->view->params['pages'] = Page::getActiveMenu(); |
|
30 | - $this->view->params['contacts'] = Contact::getDefaultContacts(); |
|
31 | - $this->view->params['controllerId'] = Yii::$app->controller->id; |
|
29 | + $this->view->params[ 'pages' ] = Page::getActiveMenu(); |
|
30 | + $this->view->params[ 'contacts' ] = Contact::getDefaultContacts(); |
|
31 | + $this->view->params[ 'controllerId' ] = Yii::$app->controller->id; |
|
32 | 32 | |
33 | 33 | return parent::beforeAction($action); |
34 | 34 | } |
@@ -24,15 +24,15 @@ |
||
24 | 24 | 'rules' => [ |
25 | 25 | [ |
26 | 26 | 'allow' => true, |
27 | - 'actions' => ['index'], |
|
28 | - 'roles' => ['?', '@'], |
|
27 | + 'actions' => [ 'index' ], |
|
28 | + 'roles' => [ '?', '@' ], |
|
29 | 29 | ], |
30 | 30 | ], |
31 | 31 | ], |
32 | 32 | 'verbs' => [ |
33 | 33 | 'class' => VerbFilter::class, |
34 | 34 | 'actions' => [ |
35 | - 'index' => ['get'], |
|
35 | + 'index' => [ 'get' ], |
|
36 | 36 | ], |
37 | 37 | ] |
38 | 38 | ]); |
@@ -94,10 +94,10 @@ discard block |
||
94 | 94 | protected function getAdditionFields(): array |
95 | 95 | { |
96 | 96 | if ($this->action->id == 'create' || $this->action->id == 'update') { |
97 | - $fields = []; |
|
97 | + $fields = [ ]; |
|
98 | 98 | |
99 | - $fields['pages'] = Page::getMenu(); |
|
100 | - $fields['albums'] = Album::find()->select([ |
|
99 | + $fields[ 'pages' ] = Page::getMenu(); |
|
100 | + $fields[ 'albums' ] = Album::find()->select([ |
|
101 | 101 | 'id', 'title' |
102 | 102 | ])->all(); |
103 | 103 | |
@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | 'defaultPageSize' => 6, |
112 | 112 | 'totalCount' => $mediafilesQuery->count() |
113 | 113 | ]); |
114 | - $fields['images'] = $mediafilesQuery->offset($media_pages->offset) |
|
114 | + $fields[ 'images' ] = $mediafilesQuery->offset($media_pages->offset) |
|
115 | 115 | ->limit($media_pages->limit) |
116 | 116 | ->all(); |
117 | - $fields['media_pages'] = $media_pages; |
|
117 | + $fields[ 'media_pages' ] = $media_pages; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | return $fields; |
@@ -43,11 +43,11 @@ |
||
43 | 43 | */ |
44 | 44 | protected function getAdditionFields(): array |
45 | 45 | { |
46 | - $additionFields = []; |
|
46 | + $additionFields = [ ]; |
|
47 | 47 | |
48 | 48 | if ($this->action->id == 'create' || $this->action->id == 'update') { |
49 | - $additionFields['roles'] = $this->validateComponent->getAuthManager()->getRoles(); |
|
50 | - $additionFields['positions'] = Position::getPositions(); |
|
49 | + $additionFields[ 'roles' ] = $this->validateComponent->getAuthManager()->getRoles(); |
|
50 | + $additionFields[ 'positions' ] = Position::getPositions(); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $additionFields; |