Passed
Push — master ( 172a4a...b1cdc5 )
by Andrey
04:34
created
models/sitemap/SitemapPage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array [langId => langCode]
29 29
      */
30
-    public $sitemapLanguages = [];
30
+    public $sitemapLanguages = [ ];
31 31
     /**
32 32
      * If TRUE - Yii::$app->language will be switched for each sitemapLanguages and restored after.
33 33
      *
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         return static::find()
62 62
             ->with([
63
-                'pagesLanguages' => function ($query) use ($lang) {
63
+                'pagesLanguages' => function($query) use ($lang) {
64 64
                     /** @var \yii\db\Query $query */
65 65
                     $query->andWhere([
66 66
                         'language_id' => Language::findOne([
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function getSitemapLoc($lang = null)
84 84
     {
85
-        return Url::to('/' . $lang . '/page/' . $this->alias, true);
85
+        return Url::to('/'.$lang.'/page/'.$this->alias, true);
86 86
     }
87 87
 
88 88
     /**
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getSitemapAlternateLinks()
118 118
     {
119
-        $buffer = [];
119
+        $buffer = [ ];
120 120
 
121 121
         foreach ($this->sitemapLanguages as $langCode) {
122
-            $buffer[$langCode] = $this->getSitemapLoc($langCode);
122
+            $buffer[ $langCode ] = $this->getSitemapLoc($langCode);
123 123
         }
124 124
 
125 125
         return $buffer;
Please login to merge, or discard this patch.
models/FeedbackSearch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * @var array
18 18
      */
19
-    public $delete_items = [];
19
+    public $delete_items = [ ];
20 20
 
21 21
     const SCENARIO_DELETE_SELECTED = 'delete_selected';
22 22
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             Model::scenarios(),
55 55
             parent::scenarios(),
56 56
             [
57
-                self::SCENARIO_DELETE_SELECTED => ['delete_items']
57
+                self::SCENARIO_DELETE_SELECTED => [ 'delete_items' ]
58 58
             ]
59 59
         );
60 60
     }
@@ -118,6 +118,6 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function deleteSelected()
120 120
     {
121
-        return static::deleteAll(['id' => $this->delete_items]);
121
+        return static::deleteAll([ 'id' => $this->delete_items ]);
122 122
     }
123 123
 }
Please login to merge, or discard this patch.
views/admin/feedback/index.php 1 patch
Spacing   +12 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@  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 $form = ActiveForm::begin([
22 22
         'action' => [
23
-            $this->params['urlPrefix'].'delete-selected'
23
+            $this->params[ 'urlPrefix' ].'delete-selected'
24 24
         ],
25 25
         'method' => 'post',
26 26
     ]); ?>
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
                 ],
62 62
                 [
63 63
                     'attribute' => 'created_at',
64
-                    'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
64
+                    'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
65 65
                     'label' => Yii::t('app', 'Created date'),
66 66
                 ],
67 67
                 [
68 68
                     'attribute' => 'updated_at',
69
-                    'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
69
+                    'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
70 70
                     'label' => Yii::t('app', 'Updated date'),
71 71
                 ],
72 72
                 'read' => [
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
                     'value' => function($searchModel) {
75 75
                         /* @var $searchModel FeedbackSearch */
76 76
                         return $searchModel->read === 1 ?
77
-                            '<i class="fa fa-check-circle text-success"> ' . Yii::t('feedback', 'Read') . '</i>' :
78
-                            '<i class="text-danger">' . Yii::t('feedback', 'New') . '</i>';
77
+                            '<i class="fa fa-check-circle text-success"> '.Yii::t('feedback', 'Read').'</i>' : '<i class="text-danger">'.Yii::t('feedback', 'New').'</i>';
79 78
                     },
80 79
                     'format' => 'raw',
81 80
                 ],
@@ -83,9 +82,9 @@  discard block
 block discarded – undo
83 82
                     'class' => 'yii\grid\ActionColumn',
84 83
                     'header' => Yii::t('app', 'Actions'),
85 84
                     'template' => '{view} {delete}',
86
-                    'urlCreator'=>function($action, $model, $key, $index){
85
+                    'urlCreator'=>function($action, $model, $key, $index) {
87 86
                         return Url::to([
88
-                            $this->params['urlPrefix'].$action,
87
+                            $this->params[ 'urlPrefix' ].$action,
89 88
                             'id' => $model->id
90 89
                         ]);
91 90
                     }
@@ -95,8 +94,8 @@  discard block
 block discarded – undo
95 94
                     'header' => Yii::t('app', 'Delete'),
96 95
                     'multiple' => true,
97 96
                     'name' => Html::getInputName($searchModel, 'delete_items'),
98
-                    'checkboxOptions' => function ($searchModel, $key, $index, $column) use ($form) {
99
-                        return ['form' => $form->id, 'value' => $searchModel->id];
97
+                    'checkboxOptions' => function($searchModel, $key, $index, $column) use ($form) {
98
+                        return [ 'form' => $form->id, 'value' => $searchModel->id ];
100 99
                     }
101 100
                 ],
102 101
             ],
@@ -104,7 +103,7 @@  discard block
 block discarded – undo
104 103
 
105 104
     <?php if ($dataProvider->count > 0): ?>
106 105
         <div class="form-group">
107
-            <?php echo Html::submitButton(Yii::t('app', 'Delete selected'), ['class' => 'btn btn-primary']) ?>
106
+            <?php echo Html::submitButton(Yii::t('app', 'Delete selected'), [ 'class' => 'btn btn-primary' ]) ?>
108 107
         </div>
109 108
     <?php endif; ?>
110 109
 
Please login to merge, or discard this patch.
views/page/view.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@  discard block
 block discarded – undo
8 8
 /* @var Product[] $products */
9 9
 /* @var Pagination $pagination */
10 10
 
11
-$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']};
11
+$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]};
12 12
 ?>
13 13
 
14
-<?php if (!empty($model->{'content_'.$this->params['shortLanguage']})): ?>
14
+<?php if (!empty($model->{'content_'.$this->params[ 'shortLanguage' ]})): ?>
15 15
     <section class="inform_block">
16 16
 
17 17
         <div class="container">
18 18
 
19 19
             <div class="row" data-animated="fadeIn">
20 20
                 <div class="col-lg-12 col-md-12 col-sm-10">
21
-                    <?php echo $model->{'content_'.$this->params['shortLanguage']} ?>
21
+                    <?php echo $model->{'content_'.$this->params[ 'shortLanguage' ]} ?>
22 22
                 </div>
23 23
             </div>
24 24
         </div>
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
                         <div class="post">
37 37
                             <h2>
38 38
                                 <span class="<?php echo $product->icon ?>"></span>
39
-                                <a href="<?php echo '/'.$this->params['shortLanguage'].'/product/'.$product->alias ?>" alt="<?php echo $product->{'title_'.$this->params['shortLanguage']} ?>">
40
-                                    <?php echo $product->{'title_'.$this->params['shortLanguage']} ?>
39
+                                <a href="<?php echo '/'.$this->params[ 'shortLanguage' ].'/product/'.$product->alias ?>" alt="<?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?>">
40
+                                    <?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?>
41 41
                                 </a>
42 42
                             </h2>
43 43
                             <div class="post_meta"><?php echo Yii::t('products', 'Posted').' '.BaseHelper::getDateAt($product->updated_at) ?></div>
44
-                            <?php echo $product->{'description_'.$this->params['shortLanguage']} ?>
44
+                            <?php echo $product->{'description_'.$this->params[ 'shortLanguage' ]} ?>
45 45
                         </div>
46
-                    <?php endforeach;?>
47
-                    <?php echo LinkPager::widget(['pagination' => $pagination]); ?>
46
+                    <?php endforeach; ?>
47
+                    <?php echo LinkPager::widget([ 'pagination' => $pagination ]); ?>
48 48
                 </div>
49 49
             </div>
50 50
         </div>
Please login to merge, or discard this patch.
models/Product.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * @var array
50 50
      */
51
-    public $albums = [];
51
+    public $albums = [ ];
52 52
 
53 53
     /**
54 54
      * Initialize.
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
             [
111 111
                 'alias',
112 112
                 'filter',
113
-                'filter' => function ($value) {
114
-                    return preg_replace( '/[^a-z0-9_]+/', '-', strtolower(trim($value)));
113
+                'filter' => function($value) {
114
+                    return preg_replace('/[^a-z0-9_]+/', '-', strtolower(trim($value)));
115 115
                 }
116 116
             ],
117 117
             [
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
                 'exist',
129 129
                 'skipOnError' => true,
130 130
                 'targetClass' => Page::class,
131
-                'targetAttribute' => ['pageId' => 'id']
131
+                'targetAttribute' => [ 'pageId' => 'id' ]
132 132
             ],
133 133
             [
134 134
                 UploadModelInterface::FILE_TYPE_THUMB,
135
-                function($attribute){
136
-                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){
135
+                function($attribute) {
136
+                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) {
137 137
                         $this->addError($attribute, 'Tumbnail content must be a numeric or string.');
138 138
                     }
139 139
                 },
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             [
152 152
                 'albums',
153 153
                 'each',
154
-                'rule' => ['integer'],
154
+                'rule' => [ 'integer' ],
155 155
             ],
156 156
         ];
157 157
     }
Please login to merge, or discard this patch.
models/Page.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     /**
44 44
      * @var array
45 45
      */
46
-    public $albums = [];
46
+    public $albums = [ ];
47 47
 
48 48
     /**
49 49
      * @var int
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
             [
111 111
                 'alias',
112 112
                 'filter',
113
-                'filter' => function ($value) {
114
-                    return preg_replace( '/[^a-z0-9_]+/', '-', strtolower(trim($value)));
113
+                'filter' => function($value) {
114
+                    return preg_replace('/[^a-z0-9_]+/', '-', strtolower(trim($value)));
115 115
                 }
116 116
             ],
117 117
             [
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
             ],
124 124
             [
125 125
                 UploadModelInterface::FILE_TYPE_THUMB,
126
-                function($attribute){
127
-                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){
126
+                function($attribute) {
127
+                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) {
128 128
                         $this->addError($attribute, 'Tumbnail content must be a numeric or string.');
129 129
                     }
130 130
                 },
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             [
134 134
                 'albums',
135 135
                 'each',
136
-                'rule' => ['integer'],
136
+                'rule' => [ 'integer' ],
137 137
             ],
138 138
         ];
139 139
     }
Please login to merge, or discard this patch.
config/admin/admin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
                 'home' => HomeController::class,
61 61
                 'sitemap' => SitemapController::class
62 62
             ],
63
-            'accessRoles' => ['admin', 'manager'],
63
+            'accessRoles' => [ 'admin', 'manager' ],
64 64
             'components' => [
65
-                'view' => require __DIR__ . '/view-component.php',
66
-                'multilanguage-validate-component' => require __DIR__ .'/multilanguage-validate-component.php',
65
+                'view' => require __DIR__.'/view-component.php',
66
+                'multilanguage-validate-component' => require __DIR__.'/multilanguage-validate-component.php',
67 67
             ],
68 68
             'isMultilanguage' => true,
69 69
         ],
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
                 'permissions' => PermissionController::class,
76 76
                 'profiles' => ProfileController::class
77 77
             ],
78
-            'accessRoles' => ['admin', 'manager'],
78
+            'accessRoles' => [ 'admin', 'manager' ],
79 79
             'components' => [
80
-                'view' => require __DIR__ . '/view-component.php',
80
+                'view' => require __DIR__.'/view-component.php',
81 81
             ],
82 82
         ],
83 83
         'mfuploader' => [
@@ -94,25 +94,25 @@  discard block
 block discarded – undo
94 94
                 'text-album' => TextAlbumController::class,
95 95
                 'other-album' => OtherAlbumController::class,
96 96
             ],
97
-            'accessRoles' => ['admin', 'manager'],
97
+            'accessRoles' => [ 'admin', 'manager' ],
98 98
             'defaultStorageType' => MFUModule::STORAGE_TYPE_LOCAL,
99
-            'previewOptions' => require __DIR__ . '/../preview-options.php',
99
+            'previewOptions' => require __DIR__.'/../preview-options.php',
100 100
             'components' => [
101 101
                 'local-upload-component' => [
102 102
                     'class' => LocalUploadComponent::class,
103 103
                     'checkExtensionByMimeType' => false,
104
-                    'uploadRoot' => dirname($_SERVER['SCRIPT_FILENAME'])
104
+                    'uploadRoot' => dirname($_SERVER[ 'SCRIPT_FILENAME' ])
105 105
                 ],
106 106
                 's3-upload-component' => [
107 107
                     'class' => S3UploadComponent::class,
108 108
                     'checkExtensionByMimeType' => false,
109
-                    'credentials' => require __DIR__ . '/../aws-credentials.php',
109
+                    'credentials' => require __DIR__.'/../aws-credentials.php',
110 110
                     'region' => 'us-west-2',
111 111
                     's3DefaultBucket' => 'filesmodule2',
112 112
                 ],
113
-                'view' => require __DIR__ . '/view-component.php',
113
+                'view' => require __DIR__.'/view-component.php',
114 114
             ],
115
-            'publicBaseUrl' => $webConfig['homeUrl']
115
+            'publicBaseUrl' => $webConfig[ 'homeUrl' ]
116 116
         ]
117 117
     ],
118 118
     'components' => [
Please login to merge, or discard this patch.