Passed
Push — master ( 644c03...ce1e0e )
by Andrey
07:03
created
views/admin/social/index.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 /* @var $this Itstructure\AdminModule\components\AdminView */
10 10
 
11 11
 $this->title = Yii::t('social', 'Social');
12
-$this->params['breadcrumbs'][] = $this->title;
12
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
13 13
 ?>
14 14
 <div class="social-index">
15 15
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     <p>
19 19
         <?php echo Html::a(Yii::t('social', 'Create social'), [
20
-            $this->params['urlPrefix'].'create'
20
+            $this->params[ 'urlPrefix' ].'create'
21 21
         ], [
22 22
             'class' => 'btn btn-success'
23 23
         ]) ?>
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
                 'value' => function($searchModel) {
35 35
                     /* @var $searchModel SocialSearch */
36 36
                     return Html::a(
37
-                        Html::tag('i', '', ['class' => $searchModel->icon]),
38
-                        Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id])
37
+                        Html::tag('i', '', [ 'class' => $searchModel->icon ]),
38
+                        Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ])
39 39
                     );
40 40
                 },
41 41
                 'format' => 'raw',
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
             ],
57 57
             'contacts' => [
58 58
                 'label' => Yii::t('social', 'Parent contact records'),
59
-                'value' => function ($searchModel) {
59
+                'value' => function($searchModel) {
60 60
                     /* @var $searchModel SocialSearch */
61 61
                     $contactRecords = '';
62 62
                     foreach ($searchModel->contacts as $contactRecord) {
63 63
                         $contactRecords .= Html::tag('li',
64 64
                             Html::a($contactRecord->getDefaultTranslate('title'),
65
-                                Url::to(['/'.$this->params['shortLanguage'].'/admin/contacts/view', 'id' => $contactRecord->id]),
65
+                                Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/contacts/view', 'id' => $contactRecord->id ]),
66 66
                                 [
67 67
                                     'target' => '_blank'
68 68
                                 ]
@@ -78,21 +78,21 @@  discard block
 block discarded – undo
78 78
             ],
79 79
             [
80 80
                 'attribute' => 'created_at',
81
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
81
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
82 82
                 'label' => Yii::t('app', 'Created date'),
83 83
             ],
84 84
             [
85 85
                 'attribute' => 'updated_at',
86
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
86
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
87 87
                 'label' => Yii::t('app', 'Updated date'),
88 88
             ],
89 89
             [
90 90
                 'class' => 'yii\grid\ActionColumn',
91 91
                 'header' => Yii::t('app', 'Actions'),
92 92
                 'template' => '{view} {update} {delete}',
93
-                'urlCreator'=>function($action, $model, $key, $index){
93
+                'urlCreator'=>function($action, $model, $key, $index) {
94 94
                     return Url::to([
95
-                        $this->params['urlPrefix'].$action,
95
+                        $this->params[ 'urlPrefix' ].$action,
96 96
                         'id' => $model->id
97 97
                     ]);
98 98
                 }
Please login to merge, or discard this patch.
views/admin/social/view.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 /* @var $model app\models\Social */
8 8
 
9 9
 $this->title = $model->url;
10
-$this->params['breadcrumbs'][] = [
10
+$this->params[ 'breadcrumbs' ][ ] = [
11 11
     'label' => Yii::t('social', 'Social'),
12 12
     'url' => [
13
-        $this->params['urlPrefix'].'index'
13
+        $this->params[ 'urlPrefix' ].'index'
14 14
     ]
15 15
 ];
16
-$this->params['breadcrumbs'][] = $this->title;
16
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
17 17
 ?>
18 18
 
19 19
 <style>
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 
28 28
     <p>
29 29
         <?php echo Html::a(Yii::t('app', 'Update'), [
30
-            $this->params['urlPrefix'].'update',
30
+            $this->params[ 'urlPrefix' ].'update',
31 31
             'id' => $model->id
32 32
         ], [
33 33
             'class' => 'btn btn-primary'
34 34
         ]) ?>
35 35
 
36 36
         <?php echo Html::a(Yii::t('app', 'Delete'), [
37
-            $this->params['urlPrefix'].'delete',
37
+            $this->params[ 'urlPrefix' ].'delete',
38 38
             'id' => $model->id
39 39
         ], [
40 40
             'class' => 'btn btn-danger',
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
             'id',
52 52
             [
53 53
                 'label' => Yii::t('app', 'Icon'),
54
-                'value' => function ($model) {
54
+                'value' => function($model) {
55 55
                     /* @var $model app\models\Social */
56
-                    return Html::tag('i', '', ['class' => $model->icon]);
56
+                    return Html::tag('i', '', [ 'class' => $model->icon ]);
57 57
                 },
58 58
                 'format' => 'raw',
59 59
             ],
60 60
             [
61 61
                 'label' => Yii::t('social', 'Url'),
62
-                'value' => function ($model) {
62
+                'value' => function($model) {
63 63
                     /* @var $model app\models\Social */
64 64
                     return Html::a(
65 65
                         Html::encode($model->url),
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
             ],
74 74
             [
75 75
                 'label' => Yii::t('social', 'Parent contact records'),
76
-                'value' => function ($model) {
76
+                'value' => function($model) {
77 77
                     /* @var $model app\models\Social */
78 78
                     $contactRecords = '';
79 79
                     foreach ($model->contacts as $contactRecord) {
80 80
                         $contactRecords .= Html::tag('li',
81 81
                             Html::a($contactRecord->getDefaultTranslate('title'),
82
-                                Url::to(['/'.$this->params['shortLanguage'].'/admin/contacts/view', 'id' => $contactRecord->id]),
82
+                                Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/contacts/view', 'id' => $contactRecord->id ]),
83 83
                                 [
84 84
                                     'target' => '_blank'
85 85
                                 ]
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
             ],
96 96
             [
97 97
                 'attribute' => 'created_at',
98
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
98
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
99 99
                 'label' => Yii::t('app', 'Created date'),
100 100
             ],
101 101
             [
102 102
                 'attribute' => 'updated_at',
103
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
103
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
104 104
                 'label' => Yii::t('app', 'Updated date'),
105 105
             ],
106 106
         ],
Please login to merge, or discard this patch.
views/admin/social/create.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 /* @var $contactList app\models\Contact[] */
6 6
 
7 7
 $this->title = Yii::t('social', 'Create social');
8
-$this->params['breadcrumbs'][] = [
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('social', 'Social'),
10 10
     'url' => [
11
-        $this->params['urlPrefix'].'index'
11
+        $this->params[ 'urlPrefix' ].'index'
12 12
     ]
13 13
 ];
14
-$this->params['breadcrumbs'][] = Yii::t('app', 'Create');
14
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Create');
15 15
 ?>
16 16
 <div class="social-create">
17 17
 
Please login to merge, or discard this patch.
views/admin/feedback/_search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     <?php $form = ActiveForm::begin([
28 28
         'action' => [
29
-            $this->params['urlPrefix'].'index'
29
+            $this->params[ 'urlPrefix' ].'index'
30 30
         ],
31 31
         'method' => 'get',
32 32
     ]); ?>
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         <div class="col-md-4">
36 36
 
37 37
             <?php echo $form->field($model, 'read')
38
-                ->radioList([0 => Yii::t('feedback', 'New'), 1 => Yii::t('feedback', 'Read')])
38
+                ->radioList([ 0 => Yii::t('feedback', 'New'), 1 => Yii::t('feedback', 'Read') ])
39 39
                 ->label(Yii::t('feedback', 'Read status')); ?>
40 40
 
41 41
             <?php echo $form->field($model, 'name')->label(Yii::t('feedback', 'Name')) ?>
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             <?php echo $form->field($model, 'subject')->label(Yii::t('feedback', 'Subject')) ?>
48 48
 
49 49
             <div class="form-group">
50
-                <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
51
-                <?php echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default', 'role' => 'clear-button']) ?>
50
+                <?php echo Html::submitButton(Yii::t('app', 'Search'), [ 'class' => 'btn btn-primary' ]) ?>
51
+                <?php echo Html::resetButton(Yii::t('app', 'Reset'), [ 'class' => 'btn btn-default', 'role' => 'clear-button' ]) ?>
52 52
             </div>
53 53
 
54 54
         </div>
Please login to merge, or discard this patch.
views/admin/feedback/index.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 /* @var $this Itstructure\AdminModule\components\AdminView */
11 11
 
12 12
 $this->title = Yii::t('feedback', 'Feedback');
13
-$this->params['breadcrumbs'][] = $this->title;
13
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
14 14
 ?>
15 15
 <div class="feedback-index">
16 16
 
17
-    <?php  echo $this->render('_search', ['model' => $searchModel]); ?>
17
+    <?php  echo $this->render('_search', [ 'model' => $searchModel ]); ?>
18 18
 
19
-    <?php echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]) ?>
19
+    <?php echo LinkPager::widget([ 'pagination' => $dataProvider->getPagination() ]) ?>
20 20
 
21 21
     <?php echo GridView::widget([
22 22
         'dataProvider' => $dataProvider,
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
             ],
55 55
             [
56 56
                 'attribute' => 'created_at',
57
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
57
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
58 58
                 'label' => Yii::t('app', 'Created date'),
59 59
             ],
60 60
             [
61 61
                 'attribute' => 'updated_at',
62
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
62
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
63 63
                 'label' => Yii::t('app', 'Updated date'),
64 64
             ],
65 65
             'read' => [
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
                 'value' => function($searchModel) {
68 68
                     /* @var $searchModel FeedbackSearch */
69 69
                     return $searchModel->read === 1 ?
70
-                        '<i class="fa fa-check-circle text-success"> ' . Yii::t('feedback', 'Read') . '</i>' :
71
-                        '<i class="text-danger">' . Yii::t('feedback', 'New') . '</i>';
70
+                        '<i class="fa fa-check-circle text-success"> '.Yii::t('feedback', 'Read').'</i>' : '<i class="text-danger">'.Yii::t('feedback', 'New').'</i>';
72 71
                 },
73 72
                 'format' => 'raw',
74 73
             ],
@@ -76,9 +75,9 @@  discard block
 block discarded – undo
76 75
                 'class' => 'yii\grid\ActionColumn',
77 76
                 'header' => Yii::t('app', 'Actions'),
78 77
                 'template' => '{view} {delete}',
79
-                'urlCreator'=>function($action, $model, $key, $index){
78
+                'urlCreator'=>function($action, $model, $key, $index) {
80 79
                     return Url::to([
81
-                        $this->params['urlPrefix'].$action,
80
+                        $this->params[ 'urlPrefix' ].$action,
82 81
                         'id' => $model->id
83 82
                     ]);
84 83
                 }
Please login to merge, or discard this patch.
views/admin/feedback/view.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 /* @var $model app\models\Feedback */
8 8
 
9 9
 $this->title = $model->subject;
10
-$this->params['breadcrumbs'][] = [
10
+$this->params[ 'breadcrumbs' ][ ] = [
11 11
     'label' => Yii::t('feedback', 'Feedback'),
12 12
     'url' => [
13
-        $this->params['urlPrefix'].'index'
13
+        $this->params[ 'urlPrefix' ].'index'
14 14
     ]
15 15
 ];
16
-$this->params['breadcrumbs'][] = $this->title;
16
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
17 17
 ?>
18 18
 
19 19
 <style>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     <p>
29 29
         <?php echo Html::a(Yii::t('app', 'Delete'), [
30
-            $this->params['urlPrefix'].'delete', 'id' => $model->id
30
+            $this->params[ 'urlPrefix' ].'delete', 'id' => $model->id
31 31
         ], [
32 32
             'class' => 'btn btn-danger',
33 33
             'data'=>[
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
             ],
76 76
             [
77 77
                 'attribute' => 'created_at',
78
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
78
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
79 79
                 'label' => Yii::t('app', 'Created date'),
80 80
             ],
81 81
             [
82 82
                 'attribute' => 'updated_at',
83
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
83
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
84 84
                 'label' => Yii::t('app', 'Updated date'),
85 85
             ],
86 86
         ],
Please login to merge, or discard this patch.
views/admin/errors/access_error.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $this->title = '';
3
-$this->params['breadcrumbs'][] = '';
3
+$this->params[ 'breadcrumbs' ][ ] = '';
4 4
 ?>
5 5
 <div class="errors-index">
6 6
 
Please login to merge, or discard this patch.
views/admin/users/_form.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             <?php
26 26
             /* @var $userModel app\models\User */
27 27
             $userModel = $model->getUserModel();
28
-            echo Html::tag('div', Html::img($userModel->getAvatar()), ['id' => 'thumbnail-container']).
28
+            echo Html::tag('div', Html::img($userModel->getAvatar()), [ 'id' => 'thumbnail-container' ]).
29 29
             FileSetter::widget(ArrayHelper::merge([
30 30
                         'model' => $model,
31 31
                         'attribute' => UploadModelInterface::FILE_TYPE_THUMB,
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                         ],
38 38
                         'mediafileContainer' => '#thumbnail-container',
39 39
                         'subDir' => $userModel->tableName(),
40
-                    ], $userModel->getIsNewRecord() ? ['ownerAttribute' => UploadModelInterface::FILE_TYPE_THUMB] : [
40
+                    ], $userModel->getIsNewRecord() ? [ 'ownerAttribute' => UploadModelInterface::FILE_TYPE_THUMB ] : [
41 41
                         'owner' => $userModel->tableName(),
42 42
                         'ownerId' => $model->getId(),
43 43
                         'ownerAttribute' => UploadModelInterface::FILE_TYPE_THUMB
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     <?php foreach ($model->roles as $role): ?>
51 51
                         <p style="margin: 2px 5px; color: blue;">
52 52
                             <?php echo Html::a($role, Url::to([
53
-                                '/'.$this->params['shortLanguage'].'/rbac/roles/view',
53
+                                '/'.$this->params[ 'shortLanguage' ].'/rbac/roles/view',
54 54
                                 'id' => $role
55 55
                             ]), [
56 56
                                     'target' => '_blank'
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                             'type' => FieldType::FIELD_TYPE_CHECKBOX,
68 68
                             'data' => ArrayHelper::map($roles, 'name', 'name'),
69 69
                             'label' => Yii::t('users', 'Roles'),
70
-                        ] : [],
70
+                        ] : [ ],
71 71
                         [
72 72
                             'name' => 'first_name',
73 73
                             'type' => FieldType::FIELD_TYPE_TEXT,
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
                         [
87 87
                             'name' => 'position_id',
88 88
                             'type' => FieldType::FIELD_TYPE_DROPDOWN,
89
-                            'data' => ArrayHelper::map($positions, 'id', function ($item) {
90
-                                return $item->{'name_'.$this->params['shortLanguage']};
89
+                            'data' => ArrayHelper::map($positions, 'id', function($item) {
90
+                                return $item->{'name_'.$this->params[ 'shortLanguage' ]};
91 91
                             }),
92 92
                             'label' => Yii::t('users', 'Position')
93 93
                         ],
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
                             'filebrowserWindowHeight' => '700',
162 162
                             'extraPlugins' => 'pbckcode',
163 163
                             'toolbarGroups' => [
164
-                                ['name' => 'pbckcode']
164
+                                [ 'name' => 'pbckcode' ]
165 165
                             ],
166 166
                             'allowedContent' => true,
167
-                            'language' => $this->params['shortLanguage'],
167
+                            'language' => $this->params[ 'shortLanguage' ],
168 168
                         ]
169 169
                     ],
170 170
                 ],
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
 
178 178
     <div class="form-group">
179
-        <?php echo Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
179
+        <?php echo Html::submitButton(Yii::t('app', 'Save'), [ 'class' => 'btn btn-success' ]) ?>
180 180
     </div>
181 181
 
182 182
     <?php ActiveForm::end(); ?>
Please login to merge, or discard this patch.
views/admin/users/update.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,21 +6,21 @@
 block discarded – undo
6 6
 /* @var $positions array|\yii\db\ActiveRecord[] */
7 7
 /* @var $changeRoles bool */
8 8
 
9
-$this->title = Yii::t('users', 'Update user') . ': ' . $model->first_name;
10
-$this->params['breadcrumbs'][] = [
9
+$this->title = Yii::t('users', 'Update user').': '.$model->first_name;
10
+$this->params[ 'breadcrumbs' ][ ] = [
11 11
     'label' => Yii::t('users', 'Users'),
12 12
     'url' => [
13
-        $this->params['urlPrefix'].'index'
13
+        $this->params[ 'urlPrefix' ].'index'
14 14
     ]
15 15
 ];
16
-$this->params['breadcrumbs'][] = [
16
+$this->params[ 'breadcrumbs' ][ ] = [
17 17
     'label' => $model->first_name,
18 18
     'url' => [
19
-        $this->params['urlPrefix'].'view',
19
+        $this->params[ 'urlPrefix' ].'view',
20 20
         'id' => $model->id
21 21
     ]
22 22
 ];
23
-$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
23
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update');
24 24
 ?>
25 25
 <div class="users-update">
26 26
 
Please login to merge, or discard this patch.