Passed
Branch master (ff3254)
by Andrey
07:30
created
views/contact/index.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /* @var Contact $model */
8 8
 /* @var Feedback $feedback */
9 9
 
10
-$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']};
10
+$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]};
11 11
 ?>
12 12
 
13 13
 <section class="contacts_block">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     <!-- MAP -->
16 16
     <div id="map" class="full_width">
17 17
         <iframe width="100%" height="240" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
18
-                src="https://maps.google.com/maps?f=q&give a hand=s_q&hl=<?php echo $this->params['shortLanguage']; ?>&q=<?php echo $model->mapQ; ?>&ie=UTF8&z=<?php echo $model->mapZoom; ?>&output=embed"></iframe>
18
+                src="https://maps.google.com/maps?f=q&give a hand=s_q&hl=<?php echo $this->params[ 'shortLanguage' ]; ?>&q=<?php echo $model->mapQ; ?>&ie=UTF8&z=<?php echo $model->mapZoom; ?>&output=embed"></iframe>
19 19
     </div><!-- //MAP -->
20 20
 
21 21
     <div class="container">
@@ -37,18 +37,18 @@  discard block
 block discarded – undo
37 37
 
38 38
                 <?php else: ?>
39 39
 
40
-                    <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
40
+                    <?php $form = ActiveForm::begin([ 'id' => 'contact-form' ]); ?>
41 41
 
42
-                    <?php echo $form->field($feedback, 'name')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Name')) ?>
42
+                    <?php echo $form->field($feedback, 'name')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Name')) ?>
43 43
 
44
-                    <?php echo $form->field($feedback, 'email')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Email')) ?>
44
+                    <?php echo $form->field($feedback, 'email')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Email')) ?>
45 45
 
46
-                    <?php echo $form->field($feedback, 'subject')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Subject')) ?>
46
+                    <?php echo $form->field($feedback, 'subject')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Subject')) ?>
47 47
 
48
-                    <?php echo $form->field($feedback, 'message')->textarea(['rows' => 6])->label(Yii::t('feedback', 'Message')) ?>
48
+                    <?php echo $form->field($feedback, 'message')->textarea([ 'rows' => 6 ])->label(Yii::t('feedback', 'Message')) ?>
49 49
 
50 50
                     <?php echo $form->field($feedback, 'verifyCode')->widget(Captcha::class, [
51
-                        'captchaAction' => '/'.$this->params['shortLanguage'].'/contact/captcha',
51
+                        'captchaAction' => '/'.$this->params[ 'shortLanguage' ].'/contact/captcha',
52 52
                         'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
53 53
                     ])->label(Yii::t('feedback', 'Verify code')) ?>
54 54
 
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
                 <h2><?php echo Yii::t('contacts', 'Communication') ?></h2>
69 69
 
70 70
                 <ul>
71
-                    <?php if (!empty($model->{'address_'.$this->params['shortLanguage']})): ?>
72
-                        <li><b class="fa fa-home"></b> <span> <?php echo $model->{'address_'.$this->params['shortLanguage']} ?></span></li>
71
+                    <?php if (!empty($model->{'address_'.$this->params[ 'shortLanguage' ]})): ?>
72
+                        <li><b class="fa fa-home"></b> <span> <?php echo $model->{'address_'.$this->params[ 'shortLanguage' ]} ?></span></li>
73 73
                     <?php endif; ?>
74
-                    <?php if (!empty($model->{'phone_'.$this->params['shortLanguage']})): ?>
75
-                        <li><b class="fa fa-phone"></b> <span> <?php echo $model->{'phone_'.$this->params['shortLanguage']} ?></span></li>
74
+                    <?php if (!empty($model->{'phone_'.$this->params[ 'shortLanguage' ]})): ?>
75
+                        <li><b class="fa fa-phone"></b> <span> <?php echo $model->{'phone_'.$this->params[ 'shortLanguage' ]} ?></span></li>
76 76
                     <?php endif; ?>
77
-                    <?php if (!empty($model->{'email_'.$this->params['shortLanguage']})): ?>
78
-                        <li><b class="fa fa-envelope-o"></b> <span><a href="mailto:<?php echo $model->{'email_'.$this->params['shortLanguage']} ?>"> <?php echo $model->{'email_'.$this->params['shortLanguage']} ?></a></span></li>
77
+                    <?php if (!empty($model->{'email_'.$this->params[ 'shortLanguage' ]})): ?>
78
+                        <li><b class="fa fa-envelope-o"></b> <span><a href="mailto:<?php echo $model->{'email_'.$this->params[ 'shortLanguage' ]} ?>"> <?php echo $model->{'email_'.$this->params[ 'shortLanguage' ]} ?></a></span></li>
79 79
                     <?php endif; ?>
80 80
 
81 81
                     <?php if (is_array($model->social)): ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,12 @@
 block discarded – undo
35 35
                     <p>Because the application is in development mode, the email is not sent but saved as a file under <code><?php echo Yii::getAlias(Yii::$app->mailer->fileTransportPath) ?></code>. Please configure the <code>useFileTransport</code> property of the <code>mail</code> application component to be false to enable email sending.</p>
36 36
                     <?php endif; ?>
37 37
 
38
-                <?php else: ?>
38
+                <?php else {
39
+    : ?>
39 40
 
40
-                    <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
41
+                    <?php $form = ActiveForm::begin(['id' => 'contact-form']);
42
+}
43
+?>
41 44
 
42 45
                     <?php echo $form->field($feedback, 'name')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Name')) ?>
43 46
 
Please login to merge, or discard this patch.
views/menu/pageItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 /* @var array $linkOptions */
6 6
 
7 7
 if (!isset($linkOptions)) {
8
-    $linkOptions = [];
8
+    $linkOptions = [ ];
9 9
 }
10 10
 
11 11
 echo Html::a($data->{'title_'.$shortLanguage},
Please login to merge, or discard this patch.
views/admin/technologies/_form.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
             ])->label(Yii::t('app', 'Icon html class')); ?>
29 29
             <div class="row" style="margin-bottom: 15px;">
30 30
                 <div class="col-md-4">
31
-                    <?php if(!$model->isNewRecord): ?>
32
-                        <?php echo Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]) ?>
31
+                    <?php if (!$model->isNewRecord): ?>
32
+                        <?php echo Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]) ?>
33 33
                     <?php endif; ?>
34 34
                     <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [
35 35
                         'target' => '_blank'
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             </div>
39 39
 
40 40
             <?php echo $form->field($model, 'about')
41
-                ->checkboxList(ArrayHelper::map($aboutList, 'id', function ($item) {
41
+                ->checkboxList(ArrayHelper::map($aboutList, 'id', function($item) {
42 42
                     /* @var $item app\models\About */
43 43
                     return $item->getDefaultTranslate('title');
44 44
                 }), [
Please login to merge, or discard this patch.
views/admin/technologies/update.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 /* @var $model app\models\Technology */
5 5
 /* @var $aboutList app\models\About[] */
6 6
 
7
-$this->title = Yii::t('technologies', 'Update technology').': ' . $model->name;
8
-$this->params['breadcrumbs'][] = [
7
+$this->title = Yii::t('technologies', 'Update technology').': '.$model->name;
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('technologies', 'Technologies'),
10 10
     'url' => [
11
-        $this->params['urlPrefix'].'index'
11
+        $this->params[ 'urlPrefix' ].'index'
12 12
     ]
13 13
 ];
14
-$this->params['breadcrumbs'][] = [
14
+$this->params[ 'breadcrumbs' ][ ] = [
15 15
     'label' => $model->name,
16 16
     'url' => [
17
-        $this->params['urlPrefix'].'view',
17
+        $this->params[ 'urlPrefix' ].'view',
18 18
         'id' => $model->id
19 19
     ]
20 20
 ];
21
-$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
21
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update');
22 22
 ?>
23 23
 <div class="technologies-update">
24 24
 
Please login to merge, or discard this patch.
views/admin/technologies/index.php 1 patch
Spacing   +11 added lines, -11 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('technologies', 'Technologies');
12
-$this->params['breadcrumbs'][] = $this->title;
12
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
13 13
 ?>
14 14
 <div class="technologies-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('technologies', 'Create technology'), [
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 TechnologySearch */
36 36
                     return Html::a(
37
-                        Html::tag('i', '', ['class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon]),
38
-                        Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id])
37
+                        Html::tag('i', '', [ 'class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon ]),
38
+                        Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ])
39 39
                     );
40 40
                 },
41 41
                 'format' => 'raw',
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                     /* @var $searchModel TechnologySearch */
47 47
                     return Html::a(
48 48
                         Html::encode($searchModel->name),
49
-                        Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id])
49
+                        Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ])
50 50
                     );
51 51
                 },
52 52
                 'format' => 'raw',
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
             ],
58 58
             'about' => [
59 59
                 'label' => Yii::t('technologies', 'Parent about records'),
60
-                'value' => function ($searchModel) {
60
+                'value' => function($searchModel) {
61 61
                     /* @var $searchModel TechnologySearch */
62 62
                     $aboutRecords = '';
63 63
                     foreach ($searchModel->about as $aboutRecord) {
64 64
                         $aboutRecords .= Html::tag('li',
65 65
                             Html::a($aboutRecord->getDefaultTranslate('title'),
66
-                                Url::to(['/'.$this->params['shortLanguage'].'/admin/about/view', 'id' => $aboutRecord->id]),
66
+                                Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/about/view', 'id' => $aboutRecord->id ]),
67 67
                                 [
68 68
                                     'target' => '_blank'
69 69
                                 ]
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
             ],
80 80
             [
81 81
                 'attribute' => 'created_at',
82
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
82
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
83 83
                 'label' => Yii::t('app', 'Created date'),
84 84
             ],
85 85
             [
86 86
                 'attribute' => 'updated_at',
87
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
87
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
88 88
                 'label' => Yii::t('app', 'Updated date'),
89 89
             ],
90 90
             [
91 91
                 'class' => 'yii\grid\ActionColumn',
92 92
                 'header' => Yii::t('app', 'Actions'),
93 93
                 'template' => '{view} {update} {delete}',
94
-                'urlCreator'=>function($action, $model, $key, $index){
94
+                'urlCreator'=>function($action, $model, $key, $index) {
95 95
                     return Url::to([
96
-                        $this->params['urlPrefix'].$action,
96
+                        $this->params[ 'urlPrefix' ].$action,
97 97
                         'id' => $model->id
98 98
                     ]);
99 99
                 }
Please login to merge, or discard this patch.
views/admin/technologies/view.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 /* @var $model app\models\Technology */
8 8
 
9 9
 $this->title = $model->name;
10
-$this->params['breadcrumbs'][] = [
10
+$this->params[ 'breadcrumbs' ][ ] = [
11 11
     'label' => Yii::t('technologies', 'Technologies'),
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',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 'label' => Yii::t('app', 'Icon'),
54 54
                 'value' => function($model) {
55 55
                     /* @var $model app\models\Technology */
56
-                    return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]);
56
+                    return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]);
57 57
                 },
58 58
                 'format' => 'raw',
59 59
             ],
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
             ],
68 68
             [
69 69
                 'label' => Yii::t('technologies', 'Parent about records'),
70
-                'value' => function ($model) {
70
+                'value' => function($model) {
71 71
                     /* @var $model app\models\Technology */
72 72
                     $aboutRecords = '';
73 73
                     foreach ($model->about as $aboutRecord) {
74 74
                         $aboutRecords .= Html::tag('li',
75 75
                             Html::a($aboutRecord->getDefaultTranslate('title'),
76
-                                Url::to(['/'.$this->params['shortLanguage'].'/admin/about/view', 'id' => $aboutRecord->id]),
76
+                                Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/about/view', 'id' => $aboutRecord->id ]),
77 77
                                 [
78 78
                                     'target' => '_blank'
79 79
                                 ]
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
             ],
90 90
             [
91 91
                 'attribute' => 'created_at',
92
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
92
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
93 93
                 'label' => Yii::t('app', 'Created date'),
94 94
             ],
95 95
             [
96 96
                 'attribute' => 'updated_at',
97
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
97
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
98 98
                 'label' => Yii::t('app', 'Updated date'),
99 99
             ],
100 100
         ],
Please login to merge, or discard this patch.
views/admin/technologies/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 $aboutList app\models\About[] */
6 6
 
7 7
 $this->title = Yii::t('technologies', 'Create technology');
8
-$this->params['breadcrumbs'][] = [
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('technologies', 'Technologies'),
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="technologies-create">
17 17
 
Please login to merge, or discard this patch.
views/admin/pages/_form.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
                             'filebrowserWindowHeight' => '700',
48 48
                             'extraPlugins' => 'pbckcode',
49 49
                             'toolbarGroups' => [
50
-                                ['name' => 'pbckcode']
50
+                                [ 'name' => 'pbckcode' ]
51 51
                             ],
52 52
                             'allowedContent' => true,
53
-                            'language' => $this->params['shortLanguage'],
53
+                            'language' => $this->params[ 'shortLanguage' ],
54 54
                         ]
55 55
                     ],
56 56
                     [
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
             ])->label(Yii::t('app', 'Icon html class')); ?>
76 76
             <div class="row" style="margin-bottom: 15px;">
77 77
                 <div class="col-md-4">
78
-                    <?php if(!$model->mainModel->isNewRecord): ?>
79
-                        <?php echo Html::tag('i', '', ['class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon]) ?>
78
+                    <?php if (!$model->mainModel->isNewRecord): ?>
79
+                        <?php echo Html::tag('i', '', [ 'class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon ]) ?>
80 80
                     <?php endif; ?>
81 81
                     <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [
82 82
                         'target' => '_blank'
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             </div>
86 86
 
87 87
             <?php echo $form->field($model, 'active')
88
-                ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')])
88
+                ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ])
89 89
                 ->label(Yii::t('app', 'Active status')); ?>
90 90
 
91 91
             <?php echo Html::label(Yii::t('app', 'Parent object'), 'multi-level-menu', [
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
                 ],
101 101
                 'mainContainerOptions' => [
102 102
                     'levels' => [
103
-                        ['style' => 'margin-left: 0; padding-left: 0;'],
104
-                        ['style' => 'margin-left: 10px; padding-left: 10px;'],
103
+                        [ 'style' => 'margin-left: 0; padding-left: 0;' ],
104
+                        [ 'style' => 'margin-left: 10px; padding-left: 10px;' ],
105 105
                     ]
106 106
                 ],
107 107
                 'itemContainerOptions' => [
Please login to merge, or discard this patch.
views/admin/pages/update.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */
5 5
 /* @var $pages array|\yii\db\ActiveRecord[] */
6 6
 
7
-$this->title = Yii::t('pages', 'Update page').': ' . $model->mainModel->getDefaultTranslate('title');
8
-$this->params['breadcrumbs'][] = [
7
+$this->title = Yii::t('pages', 'Update page').': '.$model->mainModel->getDefaultTranslate('title');
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('pages', 'Pages'),
10 10
     'url' => [
11
-        $this->params['urlPrefix'].'index'
11
+        $this->params[ 'urlPrefix' ].'index'
12 12
     ]
13 13
 ];
14
-$this->params['breadcrumbs'][] = [
14
+$this->params[ 'breadcrumbs' ][ ] = [
15 15
     'label' => $model->mainModel->getDefaultTranslate('title'),
16 16
     'url' => [
17
-        $this->params['urlPrefix'].'view',
17
+        $this->params[ 'urlPrefix' ].'view',
18 18
         'id' => $model->id
19 19
     ]
20 20
 ];
21
-$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
21
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update');
22 22
 ?>
23 23
 <div class="page-update">
24 24
 
Please login to merge, or discard this patch.