Completed
Push — master ( 62917e...4cc17f )
by Xu
770:08 queued 730:03
created
src/payment/gateways/BaseAliPay.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
      * @var array 交易类型和Trade映射
61 61
      */
62 62
     public $tradeTypeMap = [
63
-        Trade::TYPE_NATIVE => 'alipay.trade.page.pay',//WEB 原生扫码支付
64
-        Trade::TYPE_JS_API => 'alipay.trade.create',//应用内JS API,如微信
65
-        Trade::TYPE_APP => 'alipay.trade.app.pay',//app支付
66
-        Trade::TYPE_H5 => 'alipay.trade.wap.pay',//H5支付
67
-        Trade::TYPE_MICROPAY => 'alipay.trade.precreate',//刷卡支付
63
+        Trade::TYPE_NATIVE => 'alipay.trade.page.pay', //WEB 原生扫码支付
64
+        Trade::TYPE_JS_API => 'alipay.trade.create', //应用内JS API,如微信
65
+        Trade::TYPE_APP => 'alipay.trade.app.pay', //app支付
66
+        Trade::TYPE_H5 => 'alipay.trade.wap.pay', //H5支付
67
+        Trade::TYPE_MICROPAY => 'alipay.trade.precreate', //刷卡支付
68 68
     ];
69 69
 
70 70
     /**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function initApp()
85 85
     {
86 86
         if (empty ($this->appId) && !isset($this->payment->params['alipay.appId'])) {
87
-            throw new InvalidConfigException ('The "appId" property must be set.');
87
+            throw new InvalidConfigException('The "appId" property must be set.');
88 88
         }
89 89
         if (empty ($this->appId)) {
90 90
             $this->appId = $this->payment->params['alipay.appId'];
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         if (empty ($this->privateKey)) {
98
-            throw new InvalidConfigException ('The "privateKey" property must be set.');
98
+            throw new InvalidConfigException('The "privateKey" property must be set.');
99 99
         }
100 100
         if (empty ($this->publicKey)) {
101
-            throw new InvalidConfigException ('The "publicKey" property must be set.');
101
+            throw new InvalidConfigException('The "publicKey" property must be set.');
102 102
         }
103 103
         $privateKey = "file://" . Yii::getAlias($this->privateKey);
104 104
         $this->privateKey = openssl_pkey_get_private($privateKey);
Please login to merge, or discard this patch.
src/sms/gateways/AliyunGateway.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
     {
56 56
         parent::init();
57 57
         if (empty ($this->accessId)) {
58
-            throw new InvalidConfigException ('The "accessId" property must be set.');
58
+            throw new InvalidConfigException('The "accessId" property must be set.');
59 59
         }
60 60
         if (empty ($this->accessKey)) {
61
-            throw new InvalidConfigException ('The "accessKey" property must be set.');
61
+            throw new InvalidConfigException('The "accessKey" property must be set.');
62 62
         }
63 63
         if (empty ($this->signName)) {
64
-            throw new InvalidConfigException ('The "signName" property must be set.');
64
+            throw new InvalidConfigException('The "signName" property must be set.');
65 65
         }
66 66
     }
67 67
 
Please login to merge, or discard this patch.
src/sms/gateways/QcloudGateway.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@
 block discarded – undo
44 44
     {
45 45
         parent::init();
46 46
         if (empty ($this->appId)) {
47
-            throw new InvalidConfigException ('The "appId" property must be set.');
47
+            throw new InvalidConfigException('The "appId" property must be set.');
48 48
         }
49 49
         if (empty ($this->appKey)) {
50
-            throw new InvalidConfigException ('The "appKey" property must be set.');
50
+            throw new InvalidConfigException('The "appKey" property must be set.');
51 51
         }
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/sms/gateways/YuntongxunGateway.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@
 block discarded – undo
45 45
     {
46 46
         parent::init();
47 47
         if (empty ($this->appId)) {
48
-            throw new InvalidConfigException ('The "appId" property must be set.');
48
+            throw new InvalidConfigException('The "appId" property must be set.');
49 49
         }
50 50
         if (empty ($this->accountSid)) {
51
-            throw new InvalidConfigException ('The "accountSid" property must be set.');
51
+            throw new InvalidConfigException('The "accountSid" property must be set.');
52 52
         }
53 53
         if (empty ($this->accountToken)) {
54
-            throw new InvalidConfigException ('The "accountToken" property must be set.');
54
+            throw new InvalidConfigException('The "accountToken" property must be set.');
55 55
         }
56 56
     }
57 57
 
Please login to merge, or discard this patch.
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.