Completed
Push — master ( 12c6b8...efb827 )
by Xu
241:13 queued 200:57
created
src/rest/controllers/UserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             }
79 79
             return $model;
80 80
         } else {
81
-            throw new NotFoundHttpException ('User not found.');
81
+            throw new NotFoundHttpException('User not found.');
82 82
         }
83 83
     }
84 84
 
Please login to merge, or discard this patch.
src/rest/models/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@
 block discarded – undo
26 26
         return [
27 27
             'id',
28 28
             'nickname',
29
-            'faceUrl' => function () {
29
+            'faceUrl' => function() {
30 30
                 return $this->getAvatar(AvatarHelper::AVATAR_MIDDLE);
31 31
             },
32
-            "created_datetime" => function () {
32
+            "created_datetime" => function() {
33 33
                 return gmdate(DATE_ISO8601, $this->created_at);
34 34
             },
35
-            "updated_datetime" => function () {
35
+            "updated_datetime" => function() {
36 36
                 return gmdate(DATE_ISO8601, $this->updated_at);
37 37
             },
38
-            'blocked_datetime' => function () {
38
+            'blocked_datetime' => function() {
39 39
                 return gmdate(DATE_ISO8601, $this->blocked_at);
40 40
             }
41 41
         ];
Please login to merge, or discard this patch.
src/notifications/migrations/m180410_092555_create_notification_table.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@
 block discarded – undo
25 25
         // https://segmentfault.com/q/1010000000672529/a-1020000000679702
26 26
         $this->createTable($this->tableName, [
27 27
             'id' => $this->bigPrimaryKey()->unsigned()->comment('Id'),
28
-            'verb' => $this->string(32)->comment('Verb'),//活动图片
29
-            'template' => $this->string()->comment('Template'),//通知类型
28
+            'verb' => $this->string(32)->comment('Verb'), //活动图片
29
+            'template' => $this->string()->comment('Template'), //通知类型
30 30
             'is_read' => $this->boolean()->defaultValue(false)->comment('Read'),
31 31
             'is_pending' => $this->boolean()->defaultValue(false)->comment('Pending'),
32 32
             'sender_id' => $this->integer()->unsigned()->comment('Sender Id'),
33 33
             'sender_class' => $this->string()->comment('Sender Class'),
34 34
             'receiver' => $this->string()->comment('Receiver'),
35 35
             'publish_at' => $this->integer()->unsigned()->notNull()->comment('Publish At'),
36
-            'entity' => $this->string()->comment('Entity'),//任务对象
37
-            'source' => $this->string()->comment('Source'),//原有任务对象
38
-            'target' => $this->string()->comment('Target'),//目标对象
36
+            'entity' => $this->string()->comment('Entity'), //任务对象
37
+            'source' => $this->string()->comment('Source'), //原有任务对象
38
+            'target' => $this->string()->comment('Target'), //目标对象
39 39
         ], $tableOptions);
40 40
 
41 41
         $this->createIndex('notification_index', $this->tableName, ['sender_id', 'sender_class']);
Please login to merge, or discard this patch.
src/user/models/UserAuthItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         return [
69 69
             [['ruleName'], 'checkRule'],
70 70
             [['name', 'type'], 'required'],
71
-            [['name'], 'checkUnique', 'when' => function () {
71
+            [['name'], 'checkUnique', 'when' => function() {
72 72
                 return $this->isNewRecord || ($this->_item->name != $this->name);
73 73
             }],
74 74
             [['type'], 'integer'],
Please login to merge, or discard this patch.
src/admin/UserItemController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $model = new UserAuthItem(null);
82 82
         $model->type = $this->type;
83 83
         if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) {
84
-            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.'));
84
+            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Create success.'));
85 85
             return $this->redirect(['view', 'id' => $model->name]);
86 86
         } else {
87 87
             return $this->render('create', ['model' => $model]);
Please login to merge, or discard this patch.
src/admin/views/user-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/views/user-item/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
                         'attribute' => 'description',
82 82
                         'label' => Yii::t('yuncms', 'Role Description'),
83 83
                     ],
84
-                    ['class' => 'yuncms\grid\ActionColumn',],
84
+                    ['class' => 'yuncms\grid\ActionColumn', ],
85 85
                 ],
86 86
             ])
87 87
             ?>
Please login to merge, or discard this patch.
src/admin/controllers/UserRuleController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
         $model = new UserBizRule(null);
74 74
         if ($model->load(Yii::$app->request->post()) && $model->save()) {
75 75
             UserRBACHelper::invalidate();
76
-            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.'));
76
+            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Create success.'));
77 77
             return $this->redirect(['view', 'id' => $model->name]);
78 78
         } else {
79
-            return $this->render('create', ['model' => $model,]);
79
+            return $this->render('create', ['model' => $model, ]);
80 80
         }
81 81
     }
82 82
 
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         $model = $this->findModel($id);
94 94
         if ($model->load(Yii::$app->request->post()) && $model->save()) {
95 95
             UserRBACHelper::invalidate();
96
-            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Update success.'));
96
+            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Update success.'));
97 97
             return $this->redirect(['view', 'id' => $model->name]);
98 98
         }
99 99
 
100
-        return $this->render('update', ['model' => $model,]);
100
+        return $this->render('update', ['model' => $model, ]);
101 101
     }
102 102
 
103 103
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $model = $this->findModel($id);
114 114
         Yii::$app->authManager->remove($model->item);
115 115
         UserRBACHelper::invalidate();
116
-        Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Delete success.'));
116
+        Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Delete success.'));
117 117
         return $this->redirect(['index']);
118 118
     }
119 119
 
Please login to merge, or discard this patch.
src/admin/views/user/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 //                    ],
75 75
                     [
76 76
                         'attribute' => 'registration_ip',
77
-                        'value' => function ($model) {
77
+                        'value' => function($model) {
78 78
                             return $model->registration_ip == null
79 79
                                 ? '<span class="not-set">' . Yii::t('yii', '(not set)') . '</span>'
80 80
                                 : $model->registration_ip;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                     ],
97 97
                     [
98 98
                         'header' => Yii::t('yuncms', 'Confirmation'),
99
-                        'value' => function ($model) {
99
+                        'value' => function($model) {
100 100
                             if ($model->isEmailConfirmed) {
101 101
                                 return '<div class="text-center"><span class="text-success">' . Yii::t('yuncms', 'Confirmed') . '</span></div>';
102 102
                             } else {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     ],
113 113
                     [
114 114
                         'header' => Yii::t('yuncms', 'Block status'),
115
-                        'value' => function ($model) {
115
+                        'value' => function($model) {
116 116
                             if ($model->isBlocked) {
117 117
                                 return Html::a(Yii::t('yuncms', 'Unblock'), ['block', 'id' => $model->id], [
118 118
                                     'class' => 'btn btn-xs btn-success btn-block',
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                     [
133 133
                         'class' => 'yuncms\grid\ActionColumn',
134 134
                         'template' => '{assignment} {view} {update} {delete}',
135
-                        'buttons' => ['assignment' => function ($url, $model, $key) {
135
+                        'buttons' => ['assignment' => function($url, $model, $key) {
136 136
                             return Html::a('<span class="glyphicon glyphicon-dashboard"></span>',
137 137
                                 Url::toRoute(['user-assignment/view', 'id' => $model->id]), [
138 138
                                     'title' => Yii::t('yuncms', 'Assignment'),
Please login to merge, or discard this patch.