Completed
Push — master ( 56c44b...57c31b )
by Songda
05:33 queued 11s
created
src/Service/WechatServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function register(Pay $pay, ?array $data = null): void
14 14
     {
15
-        $service = function () {
15
+        $service = function() {
16 16
             return new Wechat();
17 17
         };
18 18
 
Please login to merge, or discard this patch.
src/Plugin/Alipay/PreparePlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $detail = $this->formatCert(openssl_x509_parse($cert));
90 90
 
91 91
             if ('sha1WithRSAEncryption' == $detail['signatureTypeLN'] || 'sha256WithRSAEncryption' == $detail['signatureTypeLN']) {
92
-                $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']).'_';
92
+                $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']) . '_';
93 93
             }
94 94
         }
95 95
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     protected function getCertSn(array $issuer, string $serialNumber): string
100 100
     {
101 101
         return md5(
102
-            $this->array2string(array_reverse($issuer)).$serialNumber
102
+            $this->array2string(array_reverse($issuer)) . $serialNumber
103 103
         );
104 104
     }
105 105
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $string = [];
109 109
 
110 110
         foreach ($array as $key => $value) {
111
-            $string[] = $key.'='.$value;
111
+            $string[] = $key . '=' . $value;
112 112
         }
113 113
 
114 114
         return implode(',', $string);
Please login to merge, or discard this patch.
src/Plugin/Alipay/FilterPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
      */
17 17
     public function assembly(Rocket $rocket, Closure $next): Rocket
18 18
     {
19
-        $payload = $rocket->getPayload()->filter(function ($v, $k) {
19
+        $payload = $rocket->getPayload()->filter(function($v, $k) {
20 20
             return '' !== $v && !is_null($v) && 'sign' != $k;
21 21
         });
22 22
 
23
-        $contents = array_filter($payload->get('biz_content'), function ($v, $k) {
23
+        $contents = array_filter($payload->get('biz_content'), function($v, $k) {
24 24
             return !Str::startsWith($k, '_');
25 25
         }, ARRAY_FILTER_USE_BOTH);
26 26
 
Please login to merge, or discard this patch.
src/Service/AlipayServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         Pay::set(PackerInterface::class, CollectionPacker::class);
18 18
 
19
-        $service = function () {
19
+        $service = function() {
20 20
             return new Alipay();
21 21
         };
22 22
 
Please login to merge, or discard this patch.
src/Plugin/Alipay/LaunchPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     {
85 85
         $method = $rocket->getPayload()->get('method');
86 86
 
87
-        return str_replace('.', '_', $method).'_response';
87
+        return str_replace('.', '_', $method) . '_response';
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.
src/Plugin/Alipay/Shortcut/WebShortcut.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,15 +37,14 @@  discard block
 block discarded – undo
37 37
                 $radar = $rocket->getRadar();
38 38
 
39 39
                 $response = 'GET' === $radar->getMethod() ?
40
-                    $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) :
41
-                    $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload());
40
+                    $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) : $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload());
42 41
 
43 42
                 return $rocket->setDestination($response);
44 43
             }
45 44
 
46 45
             protected function buildRedirect(string $endpoint, Collection $payload): Response
47 46
             {
48
-                $url = $endpoint.'?'.Arr::query($payload->all());
47
+                $url = $endpoint . '?' . Arr::query($payload->all());
49 48
 
50 49
                 $content = sprintf('<!DOCTYPE html>
51 50
                     <html lang="en">
@@ -66,10 +65,10 @@  discard block
 block discarded – undo
66 65
 
67 66
             protected function buildHtml(string $endpoint, Collection $payload): Response
68 67
             {
69
-                $sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='POST'>";
68
+                $sHtml = "<form id='alipay_submit' name='alipay_submit' action='" . $endpoint . "' method='POST'>";
70 69
                 foreach ($payload->all() as $key => $val) {
71 70
                     $val = str_replace("'", '&apos;', $val);
72
-                    $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";
71
+                    $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
73 72
                 }
74 73
                 $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
75 74
                 $sHtml .= "<script>document.forms['alipay_submit'].submit();</script>";
Please login to merge, or discard this patch.
src/Provider/AbstractProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             ->send((new Rocket())->setParams($params)->setPayload(new Collection()))
37 37
             ->through($plugins)
38 38
             ->via('assembly')
39
-            ->then(function ($rocket) {
39
+            ->then(function($rocket) {
40 40
                 return $this->ignite($rocket);
41 41
             });
42 42
 
Please login to merge, or discard this patch.
src/Provider/Alipay.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
      */
36 36
     public function __call(string $shortcut, array $params)
37 37
     {
38
-        $plugin = '\\Yansongda\\Pay\\Plugin\\Alipay\\Shortcut\\'.
39
-            Str::studly($shortcut).'Shortcut';
38
+        $plugin = '\\Yansongda\\Pay\\Plugin\\Alipay\\Shortcut\\' .
39
+            Str::studly($shortcut) . 'Shortcut';
40 40
 
41 41
         if (!class_exists($plugin) || !in_array(ShortcutInterface::class, class_implements($plugin))) {
42 42
             throw new InvalidParamsException(InvalidParamsException::SHORTCUT_NOT_FOUND, "[$plugin] is not incompatible");
Please login to merge, or discard this patch.
src/Functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
             $key = file_get_contents($key);
34 34
         } elseif (Str::endsWith($key, '.pem')) {
35 35
             $key = openssl_pkey_get_private(
36
-                Str::startsWith($key, 'file://') ? $key : 'file://'.$key
36
+                Str::startsWith($key, 'file://') ? $key : 'file://' . $key
37 37
             );
38
-        } else {
39
-            $key = "-----BEGIN RSA PRIVATE KEY-----\n".
40
-                wordwrap($key, 64, "\n", true).
38
+        }else {
39
+            $key = "-----BEGIN RSA PRIVATE KEY-----\n" .
40
+                wordwrap($key, 64, "\n", true) .
41 41
                 "\n-----END RSA PRIVATE KEY-----";
42 42
         }
43 43
 
Please login to merge, or discard this patch.