Completed
Push — master ( 989fd4...c30846 )
by Xu
73:44 queued 33:19
created
src/rest/controllers/PersonController.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/user/controllers/SettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 'rules' => [
50 50
                     [
51 51
                         'allow' => true,
52
-                        'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect','follower-tag'],
52
+                        'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect', 'follower-tag'],
53 53
                         'roles' => ['@'],
54 54
                     ],
55 55
                 ],
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         Yii::$app->response->format = Response::FORMAT_JSON;
130 130
         $tagId = Yii::$app->request->post('tag_id', null);
131 131
         if (($tag = Tag::findOne($tagId)) == null) {
132
-            throw new NotFoundHttpException ();
132
+            throw new NotFoundHttpException();
133 133
         } else {
134 134
             /** @var \yuncms\user\models\User $user */
135 135
             $user = Yii::$app->user->identity;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public function actionConfirm($id, $code)
158 158
     {
159 159
         $user = User::findOne($id);
160
-        if ($user === null || Yii::$app->settings->get('emailChangeStrategy','user') == UserSettings::STRATEGY_INSECURE) {
160
+        if ($user === null || Yii::$app->settings->get('emailChangeStrategy', 'user') == UserSettings::STRATEGY_INSECURE) {
161 161
             throw new NotFoundHttpException();
162 162
         }
163 163
         $user->attemptEmailChange($code);
Please login to merge, or discard this patch.
src/user/controllers/RegistrationController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         if ($user->load(Yii::$app->request->post()) && $user->createUser()) {
130 130
             $account->connect($user);
131
-            Yii::$app->user->login($user, Yii::$app->settings->get('rememberFor','user'));
131
+            Yii::$app->user->login($user, Yii::$app->settings->get('rememberFor', 'user'));
132 132
             return $this->goBack();
133 133
         }
134 134
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function actionConfirm($id, $code)
150 150
     {
151 151
         $user = User::findOne($id);
152
-        if ($user === null || Yii::$app->settings->get('enableConfirmation','user') == false) {
152
+        if ($user === null || Yii::$app->settings->get('enableConfirmation', 'user') == false) {
153 153
             return $this->goBack();
154 154
         }
155 155
         $user->attemptEmailConfirmation($code);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function actionResend()
165 165
     {
166
-        if (Yii::$app->settings->get('enableConfirmation','user') == false) {
166
+        if (Yii::$app->settings->get('enableConfirmation', 'user') == false) {
167 167
             return $this->goBack();
168 168
         }
169 169
         /** @var ResendForm $model */
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,17 +26,17 @@
 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 32
             'identified',
33
-            "created_datetime" => function () {
33
+            "created_datetime" => function() {
34 34
                 return gmdate(DATE_ISO8601, $this->created_at);
35 35
             },
36
-            "updated_datetime" => function () {
36
+            "updated_datetime" => function() {
37 37
                 return gmdate(DATE_ISO8601, $this->updated_at);
38 38
             },
39
-            'blocked_datetime' => function () {
39
+            'blocked_datetime' => function() {
40 40
                 return gmdate(DATE_ISO8601, $this->blocked_at);
41 41
             }
42 42
         ];
Please login to merge, or discard this patch.
src/rest/controllers/NotificationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $filter = null;
70 70
         $dataFilter = Yii::createObject([
71 71
             'class' => ActiveDataFilter::class,
72
-            'searchModel' => function () {
72
+            'searchModel' => function() {
73 73
                 return (new DynamicModel(['verb' => null]))
74 74
                     ->addRule('verb', 'string');
75 75
             },
Please login to merge, or discard this patch.
src/notifications/migrations/m180410_092555_create_notification_table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
         }
25 25
         // https://segmentfault.com/q/1010000000672529/a-1020000000679702
26 26
         $this->createTable($this->tableName, [
27
-            'id' => $this->char(24)->notNull()->comment('Id'),//通知ID
28
-            'verb' => $this->string(32),//执行了什么操作
29
-            'template' => $this->string(),//模板
30
-            'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'),//通知实体ID
31
-            'notifiable_class' => $this->string()->notNull()->comment('Entity'),//通知实体类名
32
-            'data' => $this->text(),//通知数据
33
-            'read_at' => $this->unixTimestamp()->comment('Read At'),//阅读时间
34
-            'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'),//创建时间
35
-            'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'),//更新时间
27
+            'id' => $this->char(24)->notNull()->comment('Id'), //通知ID
28
+            'verb' => $this->string(32), //执行了什么操作
29
+            'template' => $this->string(), //模板
30
+            'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'), //通知实体ID
31
+            'notifiable_class' => $this->string()->notNull()->comment('Entity'), //通知实体类名
32
+            'data' => $this->text(), //通知数据
33
+            'read_at' => $this->unixTimestamp()->comment('Read At'), //阅读时间
34
+            'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'), //创建时间
35
+            'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'), //更新时间
36 36
         ], $tableOptions);
37 37
         $this->addPrimaryKey('{{%notification_notifiable_pk}}', $this->tableName, 'id');
38 38
         $this->createIndex('notification_notifiable', $this->tableName, ['notifiable_id', 'notifiable_class']);
Please login to merge, or discard this patch.
migrations/m180428_084537_create_tasks_table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
         }
25 25
         $this->createTable($this->tableName, [
26 26
             'id' => $this->primaryKey(),
27
-            'name' => $this->string(50)->notNull(),//定时任务名称
28
-            'route' => $this->string(100)->notNull(),//任务路由
29
-            'crontab_str' => $this->string(50)->notNull(),//crontab格式
30
-            'switch' => $this->boolean()->notNull()->defaultValue(false),//任务开关 0关闭 1开启
31
-            'status' => $this->boolean()->defaultValue(false),//任务运行状态 0正常 1任务报错
32
-            'last_rundate' => $this->dateTime()->null(),//任务上次运行时间
33
-            'next_rundate' => $this->dateTime()->null(),//任务下次运行时间
34
-            'execmemory' => $this->decimal(9,2)->defaultValue('0.00'),//任务执行消耗内存(单位/byte)
35
-            'exectime' => $this->decimal(9,2)->defaultValue('0.00'),//任务执行消耗时间
27
+            'name' => $this->string(50)->notNull(), //定时任务名称
28
+            'route' => $this->string(100)->notNull(), //任务路由
29
+            'crontab_str' => $this->string(50)->notNull(), //crontab格式
30
+            'switch' => $this->boolean()->notNull()->defaultValue(false), //任务开关 0关闭 1开启
31
+            'status' => $this->boolean()->defaultValue(false), //任务运行状态 0正常 1任务报错
32
+            'last_rundate' => $this->dateTime()->null(), //任务上次运行时间
33
+            'next_rundate' => $this->dateTime()->null(), //任务下次运行时间
34
+            'execmemory' => $this->decimal(9, 2)->defaultValue('0.00'), //任务执行消耗内存(单位/byte)
35
+            'exectime' => $this->decimal(9, 2)->defaultValue('0.00'), //任务执行消耗时间
36 36
         ], $tableOptions);
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/admin/controllers/TaskController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -121,14 +121,14 @@
 block discarded – undo
121 121
         Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Delete success.'));
122 122
         return $this->redirect(['index']);
123 123
     }
124
-     /**
125
-      * Batch Delete existing Task model.
126
-      * If deletion is successful, the browser will be redirected to the 'index' page.
127
-      * @return mixed
128
-      * @throws NotFoundHttpException
129
-      * @throws \Throwable
130
-      * @throws \yii\db\StaleObjectException
131
-      */
124
+        /**
125
+         * Batch Delete existing Task model.
126
+         * If deletion is successful, the browser will be redirected to the 'index' page.
127
+         * @return mixed
128
+         * @throws NotFoundHttpException
129
+         * @throws \Throwable
130
+         * @throws \yii\db\StaleObjectException
131
+         */
132 132
     public function actionBatchDelete()
133 133
     {
134 134
         if (($ids = Yii::$app->request->post('ids', null)) != null) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
         if (($model = Task::findOne($id)) !== null) {
156 156
             return $model;
157 157
         } else {
158
-            throw new NotFoundHttpException (Yii::t('yii', 'The requested page does not exist.'));
158
+            throw new NotFoundHttpException(Yii::t('yii', 'The requested page does not exist.'));
159 159
         }
160 160
     }
161 161
 }
Please login to merge, or discard this patch.
src/admin/views/task/_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 /* @var yuncms\models\Task $model */
8 8
 /* @var ActiveForm $form */
9 9
 ?>
10
-<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?>
10
+<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?>
11 11
 
12 12
 <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
13 13
 <div class="hr-line-dashed"></div>
Please login to merge, or discard this patch.