Completed
Push — master ( 9630d1...dd98ee )
by Xu
259:27 queued 219:26
created
src/helpers/UploadHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public static function getImageMaxSizeByte()
48 48
     {
49
-        $imageMaxSize = Yii::$app->getSettings()->get('imageMaxSize','attachment');
49
+        $imageMaxSize = Yii::$app->getSettings()->get('imageMaxSize', 'attachment');
50 50
         return self::getMaxUploadByte($imageMaxSize);
51 51
     }
52 52
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public static function getVideoMaxSizeByte()
58 58
     {
59
-        $videoMaxSize = Yii::$app->getSettings()->get('videoMaxSize','attachment');
59
+        $videoMaxSize = Yii::$app->getSettings()->get('videoMaxSize', 'attachment');
60 60
         return self::getMaxUploadByte($videoMaxSize);
61 61
     }
62 62
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public static function getFileMaxSizeByte()
68 68
     {
69
-        $fileMaxSize = Yii::$app->getSettings()->get('fileMaxSize','attachment');
69
+        $fileMaxSize = Yii::$app->getSettings()->get('fileMaxSize', 'attachment');
70 70
         return self::getMaxUploadByte($fileMaxSize);
71 71
     }
72 72
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public static function getAcceptImageMimeTypes()
78 78
     {
79
-        $imageAllowFiles = Yii::$app->getSettings()->get('imageAllowFiles','attachment');
79
+        $imageAllowFiles = Yii::$app->getSettings()->get('imageAllowFiles', 'attachment');
80 80
         $extensions = explode(',', $imageAllowFiles);
81
-        array_walk($extensions, function (&$value) {
81
+        array_walk($extensions, function(&$value) {
82 82
             $value = 'image/' . $value;
83 83
         });
84 84
         return $extensions;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public static function normalizeExtension($extensions)
94 94
     {
95 95
         $extensions = explode(',', $extensions);
96
-        array_walk($extensions, function (&$value) {
96
+        array_walk($extensions, function(&$value) {
97 97
             $value = '.' . $value;
98 98
         });
99 99
         return $extensions;
Please login to merge, or discard this patch.
src/user/models/User.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
     const AFTER_REGISTER = 'afterRegister';
49 49
 
50 50
     //场景定义
51
-    const SCENARIO_CREATE = 'create';//后台或控制台创建用户
52
-    const SCENARIO_UPDATE = 'update';//后台或控制台修改用户
53
-    const SCENARIO_REGISTER = 'basic_create';//邮箱注册
54
-    const SCENARIO_EMAIL_REGISTER = 'email_create';//邮箱注册
55
-    const SCENARIO_MOBILE_REGISTER = 'mobile_create';//手机号注册
56
-    const SCENARIO_SETTINGS = 'settings';//更新
57
-    const SCENARIO_CONNECT = 'connect';//账户链接或自动注册新用户
51
+    const SCENARIO_CREATE = 'create'; //后台或控制台创建用户
52
+    const SCENARIO_UPDATE = 'update'; //后台或控制台修改用户
53
+    const SCENARIO_REGISTER = 'basic_create'; //邮箱注册
54
+    const SCENARIO_EMAIL_REGISTER = 'email_create'; //邮箱注册
55
+    const SCENARIO_MOBILE_REGISTER = 'mobile_create'; //手机号注册
56
+    const SCENARIO_SETTINGS = 'settings'; //更新
57
+    const SCENARIO_CONNECT = 'connect'; //账户链接或自动注册新用户
58 58
     const SCENARIO_PASSWORD = 'password';
59 59
 
60 60
     /**
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
             static::SCENARIO_EMAIL_REGISTER => ['nickname', 'email', 'password'],
96 96
             static::SCENARIO_MOBILE_REGISTER => ['mobile', 'password'],
97 97
             static::SCENARIO_SETTINGS => ['username', 'email', 'password'],
98
-            static::SCENARIO_CONNECT => ['nickname', 'email', 'password'],//链接账户密码可以为空邮箱可以为空
99
-            static::SCENARIO_PASSWORD => ['password'],//只修改密码
98
+            static::SCENARIO_CONNECT => ['nickname', 'email', 'password'], //链接账户密码可以为空邮箱可以为空
99
+            static::SCENARIO_PASSWORD => ['password'], //只修改密码
100 100
         ]);
101 101
     }
102 102
 
Please login to merge, or discard this patch.
src/user/models/UserSupport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     public function rules()
65 65
     {
66 66
         return [
67
-            [[ 'model_id'], 'required'],
67
+            [['model_id'], 'required'],
68 68
             [['user_id', 'model_id'], 'integer'],
69 69
             [['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']],
70 70
         ];
Please login to merge, or discard this patch.