Completed
Pull Request — master (#408)
by hui
01:26
created
src/Gateways/Wechat.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
      * @author yansongda <[email protected]>
122 122
      *
123 123
      * @param string $gateway
124
-     * @param array  $params
124
+     * @param string  $params
125 125
      *
126 126
      * @throws InvalidGatewayException
127 127
      *
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         $this->payload = array_merge($this->payload, $params);
147 147
 
148
-        $gateway = __CLASS__.'\\'.Str::studly($gateway).'Gateway';
148
+        $gateway = __CLASS__ . '\\' . Str::studly($gateway) . 'Gateway';
149 149
 
150 150
         if (class_exists($gateway)) {
151 151
             return $this->makePay($gateway);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             unset($this->payload['spbill_create_ip']);
205 205
         }
206 206
 
207
-        $gateway = get_class($this).'\\'.Str::studly($type).'Gateway';
207
+        $gateway = get_class($this) . '\\' . Str::studly($type) . 'Gateway';
208 208
 
209 209
         if (!class_exists($gateway) || !is_callable([new $gateway(), 'find'])) {
210 210
             throw new GatewayException("{$gateway} Done Not Exist Or Done Not Has FIND Method");
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         );
334 334
 
335 335
         if (is_array($result)) {
336
-            throw new GatewayException('Get Wechat API Error: '.$result['return_msg'], $result);
336
+            throw new GatewayException('Get Wechat API Error: ' . $result['return_msg'], $result);
337 337
         }
338 338
 
339 339
         return $result;
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $app = new $gateway();
356 356
 
357 357
         if ($app instanceof GatewayInterface) {
358
-            return $app->pay($this->gateway, array_filter($this->payload, function ($value) {
358
+            return $app->pay($this->gateway, array_filter($this->payload, function($value) {
359 359
                 return '' !== $value && !is_null($value);
360 360
             }));
361 361
         }
Please login to merge, or discard this patch.
src/Gateways/Wechat/RedpackGateway.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         }
37 37
 
38 38
         unset($payload['appid'], $payload['trade_type'],
39
-              $payload['notify_url'], $payload['spbill_create_ip']);
39
+                $payload['notify_url'], $payload['spbill_create_ip']);
40 40
 
41 41
         $payload['sign'] = Support::generateSign($payload);
42 42
 
Please login to merge, or discard this patch.
src/Gateways/Wechat/GroupRedpackGateway.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         }
37 37
 
38 38
         unset($payload['appid'], $payload['trade_type'],
39
-              $payload['notify_url'], $payload['spbill_create_ip']);
39
+                $payload['notify_url'], $payload['spbill_create_ip']);
40 40
 
41 41
         $payload['sign'] = Support::generateSign($payload);
42 42
 
Please login to merge, or discard this patch.
src/Pay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     protected function create($method): GatewayApplicationInterface
75 75
     {
76
-        $gateway = __NAMESPACE__.'\\Gateways\\'.Str::studly($method);
76
+        $gateway = __NAMESPACE__ . '\\Gateways\\' . Str::studly($method);
77 77
 
78 78
         if (class_exists($gateway)) {
79 79
             return self::make($gateway);
Please login to merge, or discard this patch.
src/Exceptions/InvalidGatewayException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($message, $raw = [])
16 16
     {
17
-        parent::__construct('INVALID_GATEWAY: '.$message, $raw, self::INVALID_GATEWAY);
17
+        parent::__construct('INVALID_GATEWAY: ' . $message, $raw, self::INVALID_GATEWAY);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
src/Exceptions/InvalidSignException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($message, $raw = [])
16 16
     {
17
-        parent::__construct('INVALID_SIGN: '.$message, $raw, self::INVALID_SIGN);
17
+        parent::__construct('INVALID_SIGN: ' . $message, $raw, self::INVALID_SIGN);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
src/Exceptions/BusinessException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($message, $raw = [])
16 16
     {
17
-        parent::__construct('ERROR_BUSINESS: '.$message, $raw, self::ERROR_BUSINESS);
17
+        parent::__construct('ERROR_BUSINESS: ' . $message, $raw, self::ERROR_BUSINESS);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
src/Exceptions/InvalidConfigException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($message, $raw = [])
16 16
     {
17
-        parent::__construct('INVALID_CONFIG: '.$message, $raw, self::INVALID_CONFIG);
17
+        parent::__construct('INVALID_CONFIG: ' . $message, $raw, self::INVALID_CONFIG);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
src/Exceptions/InvalidArgumentException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function __construct($message, $raw = [])
16 16
     {
17
-        parent::__construct('INVALID_ARGUMENT: '.$message, $raw, self::INVALID_ARGUMENT);
17
+        parent::__construct('INVALID_ARGUMENT: ' . $message, $raw, self::INVALID_ARGUMENT);
18 18
     }
19 19
 }
Please login to merge, or discard this patch.