Passed
Push — master ( 3107c6...510fa6 )
by ma
03:48
created
src/Service/Common/Base.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @param $config
34 34
      */
35
-    public function __construct($config=[])
35
+    public function __construct($config = [])
36 36
     {
37
-        if(!empty($config)){
37
+        if (!empty($config)) {
38 38
             $this->config = $config;
39 39
             $this->loadConfigGateway();
40 40
         }
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
      */
48 48
     private function loadConfigGateway()
49 49
     {
50
-        $gateway = $this->config['gateway'];// 正式环境
51
-        if($this->config['sandbox'] === false){
52
-            $this->gateway = isset($gateway[$this->gateway_type]) ? $gateway[$this->gateway_type] : $gateway['default'];// 沙箱环境
53
-        }else{
54
-            $this->gateway = $gateway['sandbox'];// 沙箱环境
50
+        $gateway = $this->config['gateway']; // 正式环境
51
+        if ($this->config['sandbox'] === false) {
52
+            $this->gateway = isset($gateway[$this->gateway_type]) ? $gateway[$this->gateway_type] : $gateway['default']; // 沙箱环境
53
+        } else {
54
+            $this->gateway = $gateway['sandbox']; // 沙箱环境
55 55
         }
56 56
 
57 57
         return $this;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             $this->validate();
73 73
             $data = $this->body;
74 74
             $sign = $this->generateSign($data);
75
-            $gateway  = $this->gateway . $this->api;
75
+            $gateway = $this->gateway . $this->api;
76 76
             $data = json_encode($data);
77 77
             if ('cli' == php_sapi_name()) {
78 78
                 echo 'api:' . $gateway . PHP_EOL;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $this->validate();
109 109
         $data = $this->body;
110 110
         $sign = $this->generateSign($data);
111
-        $gateway  = $this->gateway . $this->api;
111
+        $gateway = $this->gateway . $this->api;
112 112
         $data = json_encode($data);
113 113
         if ('cli' == php_sapi_name()) {
114 114
             echo 'api:' . $gateway . PHP_EOL;
Please login to merge, or discard this patch.
src/Service/Wechat/Mini.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['requestTimestamp', 'merOrderId', 'mid', 'tid', 'subAppId', 'subOpenId', 'tradeType','instMid'];
27
+    protected $require = ['requestTimestamp', 'merOrderId', 'mid', 'tid', 'subAppId', 'subOpenId', 'tradeType', 'instMid'];
28 28
 }
Please login to merge, or discard this patch.
src/Service/Wechat/Mp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['requestTimestamp', 'merOrderId', 'mid', 'tid', 'subAppId', 'subOpenId', 'tradeType','instMid'];
27
+    protected $require = ['requestTimestamp', 'merOrderId', 'mid', 'tid', 'subAppId', 'subOpenId', 'tradeType', 'instMid'];
28 28
 }
Please login to merge, or discard this patch.