Completed
Push — master ( 8c6de5...1836b7 )
by Xu
625:56 queued 585:57
created
src/sms/strategies/RandomStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function apply(array $gateways)
24 24
     {
25
-        uasort($gateways, function () {
25
+        uasort($gateways, function() {
26 26
             return mt_rand() - mt_rand();
27 27
         });
28 28
         return $gateways;
Please login to merge, or discard this patch.
src/sms/captcha/Captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     {
117 117
         if ($this->hasModel()) {
118 118
             $input = Html::activeTextInput($this->model, $this->attribute, $this->options);
119
-            $this->mobileField = Html::getInputId($this->model,$this->mobileField);
119
+            $this->mobileField = Html::getInputId($this->model, $this->mobileField);
120 120
         } else {
121 121
             $input = Html::textInput($this->name, $this->value, $this->options);
122 122
             $this->mobileField = $this->name;
Please login to merge, or discard this patch.
src/authclient/LinkedIn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      * @inheritdoc
20 20
      */
21 21
     protected function defaultTitle() {
22
-        return Yii::t('yuncms','LinkedIn');
22
+        return Yii::t('yuncms', 'LinkedIn');
23 23
     }
24 24
 
25 25
     /**
Please login to merge, or discard this patch.
src/payment/gateways/Alipay.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@
 block discarded – undo
57 57
             trigger_error('need openssl support sha256', E_USER_ERROR);
58 58
         }
59 59
         if (empty ($this->appId)) {
60
-            throw new InvalidConfigException ('The "appId" property must be set.');
60
+            throw new InvalidConfigException('The "appId" property must be set.');
61 61
         }
62 62
         if (empty ($this->privateKey)) {
63
-            throw new InvalidConfigException ('The "privateKey" property must be set.');
63
+            throw new InvalidConfigException('The "privateKey" property must be set.');
64 64
         }
65 65
         if (empty ($this->publicKey)) {
66
-            throw new InvalidConfigException ('The "publicKey" property must be set.');
66
+            throw new InvalidConfigException('The "publicKey" property must be set.');
67 67
         }
68 68
         $this->initPrivateKey();
69 69
         $this->initPublicKey();
Please login to merge, or discard this patch.
src/payment/gateways/WeChat.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
      * @var array 交易类型和Trade映射
71 71
      */
72 72
     public $tradeTypeMap = [
73
-        self::TRADE_TYPE_QR_CODE => 'NATIVE',//WEB 原生扫码支付
74
-        self::TRADE_TYPE_JS_API => 'JSAPI',//应用内JS API,如微信
75
-        self::TRADE_TYPE_APP => 'APP',//app支付
76
-        self::TRADE_TYPE_WAP => 'MWEB',//H5支付
77
-        self::TRADE_TYPE_POS => 'MICROPAY',//刷卡支付
73
+        self::TRADE_TYPE_QR_CODE => 'NATIVE', //WEB 原生扫码支付
74
+        self::TRADE_TYPE_JS_API => 'JSAPI', //应用内JS API,如微信
75
+        self::TRADE_TYPE_APP => 'APP', //app支付
76
+        self::TRADE_TYPE_WAP => 'MWEB', //H5支付
77
+        self::TRADE_TYPE_POS => 'MICROPAY', //刷卡支付
78 78
         self::TRADE_TYPE_WEB => 'NATIVE'//PC支付
79 79
     ];
80 80
 
@@ -89,19 +89,19 @@  discard block
 block discarded – undo
89 89
             trigger_error('need openssl support sha256', E_USER_ERROR);
90 90
         }
91 91
         if (empty ($this->appId)) {
92
-            throw new InvalidConfigException ('The "appId" property must be set.');
92
+            throw new InvalidConfigException('The "appId" property must be set.');
93 93
         }
94 94
         if (empty ($this->apiKey)) {
95
-            throw new InvalidConfigException ('The "apiKey" property must be set.');
95
+            throw new InvalidConfigException('The "apiKey" property must be set.');
96 96
         }
97 97
         if (empty ($this->mchId)) {
98
-            throw new InvalidConfigException ('The "mchId" property must be set.');
98
+            throw new InvalidConfigException('The "mchId" property must be set.');
99 99
         }
100 100
         if (empty ($this->privateKey)) {
101
-            throw new InvalidConfigException ('The "privateKey" property must be set.');
101
+            throw new InvalidConfigException('The "privateKey" property must be set.');
102 102
         }
103 103
         if (empty ($this->publicKey)) {
104
-            throw new InvalidConfigException ('The "publicKey" property must be set.');
104
+            throw new InvalidConfigException('The "publicKey" property must be set.');
105 105
         }
106 106
         $this->initPrivateKey();
107 107
         $this->initPublicKey();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 $weParams = $trade->user->socialAccounts['wechat']->getDecodedData();
140 140
                 $data['openid'] = $weParams['openid'];
141 141
             } else {
142
-                throw new PaymentException ('Non-WeChat authorized login.');
142
+                throw new PaymentException('Non-WeChat authorized login.');
143 143
             }
144 144
         }
145 145
         $response = $this->post('pay/unifiedorder', $data)->send();
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 throw new PaymentException($response->data['return_msg']);
152 152
             }
153 153
         } else {
154
-            throw new Exception ('Http request failed.');
154
+            throw new Exception('Http request failed.');
155 155
         }
156 156
     }
157 157
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         } elseif ($this->signType == self::SIGNATURE_METHOD_SHA256) {
243 243
             $sign = hash_hmac('sha256', $bizString, $this->apiKey);
244 244
         } else {
245
-            throw new InvalidConfigException ('This encryption is not supported');
245
+            throw new InvalidConfigException('This encryption is not supported');
246 246
         }
247 247
         return strtoupper($sign);
248 248
     }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 throw new InvalidConfigException(openssl_error_string());
272 272
             }
273 273
         } else {
274
-            throw new InvalidConfigException ('The "privateKey" property must be set.');
274
+            throw new InvalidConfigException('The "privateKey" property must be set.');
275 275
         }
276 276
     }
277 277
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 throw new InvalidConfigException(openssl_error_string());
289 289
             }
290 290
         } else {
291
-            throw new InvalidConfigException ('The "publicKey" property must be set.');
291
+            throw new InvalidConfigException('The "publicKey" property must be set.');
292 292
         }
293 293
     }
294 294
 }
295 295
\ No newline at end of file
Please login to merge, or discard this patch.
src/payment/gateways/Gateway.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@
 block discarded – undo
26 26
     const DEFAULT_TIMEOUT = 5.0;
27 27
 
28 28
     //交易类型
29
-    const TRADE_TYPE_QR_CODE = 'qr-code';//扫码支付
30
-    const TRADE_TYPE_JS_API = 'js-api';//应用内JS API,如微信
31
-    const TRADE_TYPE_APP = 'app';//app支付
32
-    const TRADE_TYPE_WAP = 'wap';//H5支付
33
-    const TRADE_TYPE_WEB = 'web';//PC支付
34
-    const TRADE_TYPE_POS = 'pos';//刷卡支付
29
+    const TRADE_TYPE_QR_CODE = 'qr-code'; //扫码支付
30
+    const TRADE_TYPE_JS_API = 'js-api'; //应用内JS API,如微信
31
+    const TRADE_TYPE_APP = 'app'; //app支付
32
+    const TRADE_TYPE_WAP = 'wap'; //H5支付
33
+    const TRADE_TYPE_WEB = 'web'; //PC支付
34
+    const TRADE_TYPE_POS = 'pos'; //刷卡支付
35 35
 
36 36
     //交易状态
37
-    const STATE_NOT_PAY = 0b0;//未支付
38
-    const STATE_SUCCESS = 0b1;//支付成功
39
-    const STATE_FAILED = 0b10;//支付失败
40
-    const STATE_CLOSED = 0b100;//已关闭
41
-    const STATE_REVOKED = 0b101;//已撤销
42
-    const STATE_ERROR = 0b110;//错误
43
-    const STATE_REFUND = 0b111;//转入退款
44
-    const STATE_REFUND_SUCCESS = 0b11;//转入退款
45
-    const STATE_REFUND_FAILED = 0b11;//转入退款
37
+    const STATE_NOT_PAY = 0b0; //未支付
38
+    const STATE_SUCCESS = 0b1; //支付成功
39
+    const STATE_FAILED = 0b10; //支付失败
40
+    const STATE_CLOSED = 0b100; //已关闭
41
+    const STATE_REVOKED = 0b101; //已撤销
42
+    const STATE_ERROR = 0b110; //错误
43
+    const STATE_REFUND = 0b111; //转入退款
44
+    const STATE_REFUND_SUCCESS = 0b11; //转入退款
45
+    const STATE_REFUND_FAILED = 0b11; //转入退款
46 46
 
47 47
     /**
48 48
      * @var float 连接超时时间
Please login to merge, or discard this patch.
config/wechat.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@
 block discarded – undo
11 11
     ],
12 12
     'components' => [
13 13
         'cache' => [
14
-            'keyPrefix' => 'wechat',       //前缀
14
+            'keyPrefix' => 'wechat', //前缀
15 15
         ],
16 16
         'request' => [
17 17
             'class' => yuncms\wechat\Request::class,
18 18
             'secureProtocolHeaders' => [
19 19
                 'X-Forwarded-Proto' => ['https'], // Common
20 20
                 'Front-End-Https' => ['on'], // Microsoft
21
-                'X-Client-Scheme' => ['https'],// Aliyun CDN
21
+                'X-Client-Scheme' => ['https'], // Aliyun CDN
22 22
                 'X-Client-Proto' => ['https'],
23 23
             ],
24 24
             'ipHeaders' => [
25
-                'X-Forwarded-For',// Common
25
+                'X-Forwarded-For', // Common
26 26
                 'X-Cluster-Client-IP',
27
-                'ALI-CDN-REAL-IP',// Aliyun CDN
27
+                'ALI-CDN-REAL-IP', // Aliyun CDN
28 28
                 'Client-IP',
29 29
                 'X-Forwarded',
30 30
                 'Forwarded-For',
Please login to merge, or discard this patch.
config/console.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     ],
19 19
     'components' => [
20 20
         'cache' => [
21
-            'keyPrefix' => 'rest',       //前缀
21
+            'keyPrefix' => 'rest', //前缀
22 22
         ],
23 23
         'request' => [
24 24
             'class' => yuncms\console\Request::class,
Please login to merge, or discard this patch.
src/admin/models/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
 class Admin extends ActiveRecord implements IdentityInterface
31 31
 {
32 32
     //场景定义
33
-    const SCENARIO_CREATE = 'create';//创建
34
-    const SCENARIO_UPDATE = 'update';//更新
33
+    const SCENARIO_CREATE = 'create'; //创建
34
+    const SCENARIO_UPDATE = 'update'; //更新
35 35
 
36 36
     const STATUS_ACTIVE = 0b0;
37 37
     const STATUS_DELETED = 0b1;
Please login to merge, or discard this patch.