Completed
Push — master ( 8c6de5...1836b7 )
by Xu
625:56 queued 585:57
created
src/admin/views/user/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 //                    ],
74 74
                     [
75 75
                         'attribute' => 'registration_ip',
76
-                        'value' => function ($model) {
76
+                        'value' => function($model) {
77 77
                             return $model->registration_ip == null
78 78
                                 ? '<span class="not-set">' . Yii::t('app', '(not set)') . '</span>'
79 79
                                 : $model->registration_ip;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                     ],
96 96
                     [
97 97
                         'header' => Yii::t('yuncms', 'Confirmation'),
98
-                        'value' => function ($model) {
98
+                        'value' => function($model) {
99 99
                             if ($model->isEmailConfirmed) {
100 100
                                 return '<div class="text-center"><span class="text-success">' . Yii::t('yuncms', 'Confirmed') . '</span></div>';
101 101
                             } else {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                     ],
112 112
                     [
113 113
                         'header' => Yii::t('yuncms', 'Block status'),
114
-                        'value' => function ($model) {
114
+                        'value' => function($model) {
115 115
                             if ($model->isBlocked) {
116 116
                                 return Html::a(Yii::t('yuncms', 'Unblock'), ['block', 'id' => $model->id], [
117 117
                                     'class' => 'btn btn-xs btn-success btn-block',
Please login to merge, or discard this patch.
src/admin/ItemController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $model = new AdminAuthItem(null);
80 80
         $model->type = $this->type;
81 81
         if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) {
82
-            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.'));
82
+            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Create success.'));
83 83
             return $this->redirect(['view', 'id' => $model->name]);
84 84
         } else {
85 85
             return $this->render('create', ['model' => $model]);
Please login to merge, or discard this patch.
src/admin/models/AdminAuthItem.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/controllers/AssignmentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         parent::init();
35 35
         if ($this->userClassName === null) {
36 36
             $this->userClassName = Yii::$app->getUser()->identityClass;
37
-            $this->userClassName ? : 'yuncms\admin\models\Admin';
37
+            $this->userClassName ?: 'yuncms\admin\models\Admin';
38 38
         }
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/user/controllers/SettingsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 'rules' => [
54 54
                     [
55 55
                         'allow' => true,
56
-                        'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect','follower-tag'],
56
+                        'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect', 'follower-tag'],
57 57
                         'roles' => ['@'],
58 58
                     ],
59 59
                 ],
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         Yii::$app->response->format = Response::FORMAT_JSON;
129 129
         $tagId = Yii::$app->request->post('tag_id', null);
130 130
         if (($tag = Tag::findOne($tagId)) == null) {
131
-            throw new NotFoundHttpException ();
131
+            throw new NotFoundHttpException();
132 132
         } else {
133 133
             /** @var \yuncms\user\models\User $user */
134 134
             $user = Yii::$app->user->identity;
Please login to merge, or discard this patch.
config/web.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     ],
10 10
     'components' => [
11 11
         'cache' => [
12
-            'keyPrefix' => 'web',       //前缀
12
+            'keyPrefix' => 'web', //前缀
13 13
         ],
14 14
         'user' => [
15 15
             'identityClass' => yuncms\user\models\User::class,
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
             'secureProtocolHeaders' => [
23 23
                 'X-Forwarded-Proto' => ['https'], // Common
24 24
                 'Front-End-Https' => ['on'], // Microsoft
25
-                'X-Client-Scheme' => ['https'],// Aliyun CDN
25
+                'X-Client-Scheme' => ['https'], // Aliyun CDN
26 26
                 'X-Client-Proto' => ['https'],
27 27
             ],
28 28
             'ipHeaders' => [
29
-                'X-Forwarded-For',// Common
29
+                'X-Forwarded-For', // Common
30 30
                 'X-Cluster-Client-IP',
31
-                'ALI-CDN-REAL-IP',// Aliyun CDN
31
+                'ALI-CDN-REAL-IP', // Aliyun CDN
32 32
                 'Client-IP',
33 33
                 'X-Forwarded',
34 34
                 'Forwarded-For',
Please login to merge, or discard this patch.
src/user/controllers/SecurityController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
                 Yii::$app->session->setFlash('danger', Yii::t('yuncms', 'Your account has been blocked.'));
133 133
                 $this->action->successUrl = Url::to(['/user/security/login']);
134 134
             } else {
135
-                Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor','user'));
135
+                Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor', 'user'));
136 136
                 $this->action->successUrl = Yii::$app->getUser()->getReturnUrl();
137 137
             }
138 138
         } else {
Please login to merge, or discard this patch.
src/user/models/UserProfile.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
     const GENDER_FEMALE = 0b10;
54 54
 
55 55
     //当前状态
56
-    const CURRENT_OTHER = 0b0;//其他
57
-    const CURRENT_WORK = 0b1;//正常工作
58
-    const CURRENT_FREELANCE = 0b10;//自由职业者
59
-    const CURRENT_START = 0b11;//创业
60
-    const CURRENT_OUTSOURCE = 0b100;//外包
61
-    const CURRENT_JOB = 0b101;//求职
62
-    const CURRENT_STUDENT = 0b110;//学生
56
+    const CURRENT_OTHER = 0b0; //其他
57
+    const CURRENT_WORK = 0b1; //正常工作
58
+    const CURRENT_FREELANCE = 0b10; //自由职业者
59
+    const CURRENT_START = 0b11; //创业
60
+    const CURRENT_OUTSOURCE = 0b100; //外包
61
+    const CURRENT_JOB = 0b101; //求职
62
+    const CURRENT_STUDENT = 0b110; //学生
63 63
 
64 64
     /**
65 65
      * @inheritdoc
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             [
102 102
                 'mobile',
103 103
                 MobileValidator::class,
104
-                'when' => function ($model) {
104
+                'when' => function($model) {
105 105
                     return $model->country == 'China';
106 106
                 }
107 107
             ],
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->attemptConfirmation($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.