Passed
Pull Request — master (#1081)
by
unknown
02:14
created
src/Plugin/Alipay/V2/ResponseHtmlPlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     protected function buildRedirect(string $endpoint, Collection $payload): Response
37 37
     {
38
-        $url = $endpoint.(!str_contains($endpoint, '?') ? '?' : '&').$payload->query();
38
+        $url = $endpoint . (!str_contains($endpoint, '?') ? '?' : '&') . $payload->query();
39 39
 
40 40
         $content = sprintf(
41 41
             '<!DOCTYPE html>
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 
59 59
     protected function buildHtml(string $endpoint, Collection $payload): Response
60 60
     {
61
-        $sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='POST'>";
61
+        $sHtml = "<form id='alipay_submit' name='alipay_submit' action='" . $endpoint . "' method='POST'>";
62 62
         foreach ($payload->all() as $key => $val) {
63 63
             $val = str_replace("'", '&apos;', $val);
64
-            $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";
64
+            $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
65 65
         }
66 66
         $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
67 67
         $sHtml .= "<script>document.forms['alipay_submit'].submit();</script>";
Please login to merge, or discard this patch.
src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $invokeConfig = new Config([
73 73
             'appId' => $this->getAppId($payload, $config, $params),
74
-            'timeStamp' => time().'',
74
+            'timeStamp' => time() . '',
75 75
             'nonceStr' => Str::random(32),
76
-            'package' => 'prepay_id='.$prepayId,
76
+            'package' => 'prepay_id=' . $prepayId,
77 77
             'signType' => 'RSA',
78 78
         ]);
79 79
 
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function getSign(Collection $invokeConfig, array $config): string
89 89
     {
90
-        $contents = $invokeConfig->get('appId', '')."\n"
91
-            .$invokeConfig->get('timeStamp', '')."\n"
92
-            .$invokeConfig->get('nonceStr', '')."\n"
93
-            .$invokeConfig->get('package', '')."\n";
90
+        $contents = $invokeConfig->get('appId', '') . "\n"
91
+            .$invokeConfig->get('timeStamp', '') . "\n"
92
+            .$invokeConfig->get('nonceStr', '') . "\n"
93
+            .$invokeConfig->get('package', '') . "\n";
94 94
 
95 95
         return get_wechat_sign($config, $contents);
96 96
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     protected function getAppId(?Collection $payload, array $config, array $params): string
99 99
     {
100 100
         if (Pay::MODE_SERVICE === ($config['mode'] ?? Pay::MODE_NORMAL)) {
101
-            return $payload?->get('_invoke_appid') ?? $config['sub_'.get_wechat_type_key($params)] ?? '';
101
+            return $payload?->get('_invoke_appid') ?? $config['sub_' . get_wechat_type_key($params)] ?? '';
102 102
         }
103 103
 
104 104
         return $payload?->get('_invoke_appid') ?? $config[get_wechat_type_key($params)] ?? '';
Please login to merge, or discard this patch.
src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
     {
71 71
         $invokeConfig = new Config([
72 72
             'appId' => $this->getAppId($payload, $config),
73
-            'timeStamp' => time().'',
73
+            'timeStamp' => time() . '',
74 74
             'nonceStr' => Str::random(32),
75
-            'package' => 'prepay_id='.$prepayId,
75
+            'package' => 'prepay_id=' . $prepayId,
76 76
             'signType' => 'RSA',
77 77
         ]);
78 78
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected function getSign(Collection $invokeConfig, array $config): string
88 88
     {
89
-        $contents = $invokeConfig->get('appId', '')."\n"
90
-            .$invokeConfig->get('timeStamp', '')."\n"
91
-            .$invokeConfig->get('nonceStr', '')."\n"
92
-            .$invokeConfig->get('package', '')."\n";
89
+        $contents = $invokeConfig->get('appId', '') . "\n"
90
+            .$invokeConfig->get('timeStamp', '') . "\n"
91
+            .$invokeConfig->get('nonceStr', '') . "\n"
92
+            .$invokeConfig->get('package', '') . "\n";
93 93
 
94 94
         return get_wechat_sign($config, $contents);
95 95
     }
Please login to merge, or discard this patch.
src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             'prepayid' => $prepayId,
75 75
             'package' => 'Sign=WXPay',
76 76
             'noncestr' => Str::random(32),
77
-            'timestamp' => time().'',
77
+            'timestamp' => time() . '',
78 78
         ]);
79 79
 
80 80
         $invokeConfig->set('sign', $this->getSign($invokeConfig, $config));
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function getSign(Collection $invokeConfig, array $config): string
89 89
     {
90
-        $contents = $invokeConfig->get('appid', '')."\n"
91
-            .$invokeConfig->get('timestamp', '')."\n"
92
-            .$invokeConfig->get('noncestr', '')."\n"
93
-            .$invokeConfig->get('prepayid', '')."\n";
90
+        $contents = $invokeConfig->get('appid', '') . "\n"
91
+            .$invokeConfig->get('timestamp', '') . "\n"
92
+            .$invokeConfig->get('noncestr', '') . "\n"
93
+            .$invokeConfig->get('prepayid', '') . "\n";
94 94
 
95 95
         return get_wechat_sign($config, $contents);
96 96
     }
Please login to merge, or discard this patch.