Completed
Push — master ( 067418...4daa60 )
by Xu
47:44 queued 07:08
created
src/widgets/BootstrapTypeAhead.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
 
73 73
         $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : 'null';
74 74
 
75
-        foreach($this->dataSets as $dataSet) {
76
-            if(empty($dataSet)) {
75
+        foreach ($this->dataSets as $dataSet) {
76
+            if (empty($dataSet)) {
77 77
                 continue;
78 78
             }
79 79
             $dataSets[] = Json::encode($dataSet);
Please login to merge, or discard this patch.
src/helpers/RBACHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
             }
231 231
             return implode(' ', $result);
232 232
         }
233
-        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) {
233
+        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) {
234 234
             return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : '';
235 235
         }, $buttons);
236 236
     }
Please login to merge, or discard this patch.
src/admin/views/menu/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                     [
55 55
                         'attribute' => 'icon',
56 56
                         'value' => function($model) {
57
-                           return Html::icon($model->icon);
57
+                            return Html::icon($model->icon);
58 58
                         },
59 59
                         'format' => 'raw'
60 60
                     ],
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
                     [
66 66
                         'class' => 'yuncms\grid\ActionColumn',
67 67
                         'template' => '{add} {view} {update} {delete}',
68
-                        'buttons' => ['add' => function ($url, $model, $key) {
68
+                        'buttons' => ['add' => function($url, $model, $key) {
69 69
                             return Html::a('<span class="fa fa-plus"></span>',
70 70
                                 Url::toRoute(['/admin/menu/create', 'parent' => $model->id]), [
71 71
                                     'title' => Yii::t('yuncms', 'Add subMenu'),
Please login to merge, or discard this patch.
src/admin/views/setting/settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             <?php Box::begin([
22 22
                 'header' => Html::encode($this->title),
23 23
             ]); ?>
24
-            <?php $form = ActiveForm::begin(['layout' => 'horizontal',]); ?>
24
+            <?php $form = ActiveForm::begin(['layout' => 'horizontal', ]); ?>
25 25
 
26 26
             <?= $form->field($model, 'baseUrl') ?>
27 27
             <div class="hr-line-dashed"></div>
Please login to merge, or discard this patch.
src/admin/views/item/_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 unset($rules[RouteRule::RULE_NAME]);
16 16
 ?>
17 17
 
18
-<?php $form = ActiveForm::begin(['layout' => 'horizontal',]); ?>
18
+<?php $form = ActiveForm::begin(['layout' => 'horizontal', ]); ?>
19 19
 <?= $form->field($model, 'name')->textInput(['maxlength' => 64]) ?>
20 20
 <div class="hr-line-dashed"></div>
21 21
 <?= $form->field($model, 'description')->textarea(['rows' => 2]) ?>
Please login to merge, or discard this patch.
src/admin/models/AdminMenu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
                 'range' => static::find()->select(['name'])->column(),
64 64
                 'message' => 'Menu "{value}" not found.'],
65 65
             [['parent', 'route', 'icon', 'data', 'sort'], 'default'],
66
-            [['parent'], 'filterParent', 'when' => function () {
66
+            [['parent'], 'filterParent', 'when' => function() {
67 67
                 return !$this->isNewRecord;
68 68
             }],
69 69
             [['sort'], 'integer'],
Please login to merge, or discard this patch.
src/grid/PositionColumn.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             [
76 76
                 'first' => [
77 77
                     'icon' => 'triangle-top',
78
-                    'visible' => function ($model) {
78
+                    'visible' => function($model) {
79 79
                         /* @var $model \yii\db\BaseActiveRecord */
80 80
                         if ($this->attribute !== null && isset($model[$this->attribute])) {
81 81
                             return $model[$this->attribute] > 1;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 ],
91 91
                 'last' => [
92 92
                     'icon' => 'triangle-bottom',
93
-                    'visible' => function ($model) {
93
+                    'visible' => function($model) {
94 94
                         /* @var $model \yii\db\BaseActiveRecord */
95 95
                         if ($this->attribute !== null && isset($model[$this->attribute])) {
96 96
                             return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 ],
106 106
                 'prev' => [
107 107
                     'icon' => 'arrow-up',
108
-                    'visible' => function ($model) {
108
+                    'visible' => function($model) {
109 109
                         /* @var $model \yii\db\BaseActiveRecord */
110 110
                         if ($this->attribute !== null && isset($model[$this->attribute])) {
111 111
                             return $model[$this->attribute] > 1;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 ],
121 121
                 'next' => [
122 122
                     'icon' => 'arrow-down',
123
-                    'visible' => function ($model) {
123
+                    'visible' => function($model) {
124 124
                         /* @var $model \yii\db\BaseActiveRecord */
125 125
                         if ($this->attribute !== null && isset($model[$this->attribute])) {
126 126
                             return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     protected function renderDataCellContent($model, $key, $index)
145 145
     {
146 146
         if ($this->content === null) {
147
-            return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($model, $key, $index) {
147
+            return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($model, $key, $index) {
148 148
                 $name = $matches[1];
149 149
                 if ($name === 'value') {
150 150
                     return $this->grid->formatter->format($this->getDataCellValue($model, $key, $index), $this->format);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         } else {
243 243
             $params = array_merge(
244 244
                 Yii::$app->getRequest()->getQueryParams(),
245
-                is_array($key) ? $key : ['id' => (string) $key]
245
+                is_array($key) ? $key : ['id' => (string)$key]
246 246
             );
247 247
             $params[$this->positionParam] = $position;
248 248
             $params[0] = $this->route;
Please login to merge, or discard this patch.
src/grid/TreeGrid.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -244,14 +244,14 @@  discard block
 block discarded – undo
244 244
         } else {
245 245
             $options = $this->rowOptions;
246 246
         }
247
-        $options['data-key'] = is_array($key) ? json_encode($key) : (string) $key;
247
+        $options['data-key'] = is_array($key) ? json_encode($key) : (string)$key;
248 248
 
249 249
         $id = ArrayHelper::getValue($model, $this->keyColumnName);
250 250
         Html::addCssClass($options, "treegrid-$id");
251 251
 
252 252
         $parentId = ArrayHelper::getValue($model, $this->parentColumnName);
253 253
         if ($parentId) {
254
-            if(ArrayHelper::getValue($this->pluginOptions, 'initialState') == 'collapsed'){
254
+            if (ArrayHelper::getValue($this->pluginOptions, 'initialState') == 'collapsed') {
255 255
                 Html::addCssStyle($options, 'display: none;');
256 256
             }
257 257
             Html::addCssClass($options, "treegrid-parent-$parentId");
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                 $column = $this->createDataColumn($column);
345 345
             } else {
346 346
                 $column = Yii::createObject(array_merge([
347
-                    'class' => $this->dataColumnClass ? : TreeColumn::class,
347
+                    'class' => $this->dataColumnClass ?: TreeColumn::class,
348 348
                     'grid' => $this,
349 349
                 ], $column));
350 350
             }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         }
370 370
 
371 371
         return Yii::createObject([
372
-            'class' => $this->dataColumnClass ? : TreeColumn::class,
372
+            'class' => $this->dataColumnClass ?: TreeColumn::class,
373 373
             'grid' => $this,
374 374
             'attribute' => $matches[1],
375 375
             'format' => isset($matches[3]) ? $matches[3] : 'text',
Please login to merge, or discard this patch.
src/admin/views/security/login.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
                 'autocomplete' => 'off',
57 57
                 'placeholder' => Yii::t('yuncms', 'Password')
58 58
             ],
59
-           'errorOptions' => ['class' => 'help-block help-block-error full-width','style'=>'text-align:left'],
59
+            'errorOptions' => ['class' => 'help-block help-block-error full-width','style'=>'text-align:left'],
60 60
         ])->passwordInput()->label(false) ?>
61 61
 
62 62
         <?= $form->field($model, 'verifyCode', [
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 'autocomplete' => 'off',
49 49
                 'placeholder' => Yii::t('yuncms', 'Username')
50 50
             ],
51
-            'errorOptions' => ['class' => 'help-block help-block-error full-width','style'=>'text-align:left'],
51
+            'errorOptions' => ['class' => 'help-block help-block-error full-width', 'style'=>'text-align:left'],
52 52
         ])->label(false); ?>
53 53
 
54 54
         <?= $form->field($model, 'password', [
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
                 'autocomplete' => 'off',
57 57
                 'placeholder' => Yii::t('yuncms', 'Password')
58 58
             ],
59
-           'errorOptions' => ['class' => 'help-block help-block-error full-width','style'=>'text-align:left'],
59
+           'errorOptions' => ['class' => 'help-block help-block-error full-width', 'style'=>'text-align:left'],
60 60
         ])->passwordInput()->label(false) ?>
61 61
 
62 62
         <?= $form->field($model, 'verifyCode', [
63
-            'errorOptions' => ['class' => 'help-block help-block-error full-width','style'=>'text-align:left'],
63
+            'errorOptions' => ['class' => 'help-block help-block-error full-width', 'style'=>'text-align:left'],
64 64
         ])->widget(Captcha::class, [
65 65
             'captchaAction' => '/admin/security/captcha',
66 66
             'options' => [
Please login to merge, or discard this patch.