Passed
Push — master ( 6c65d2...8466fe )
by Songda
03:29 queued 01:39
created
src/Plugin/Wechat/GeneralPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     protected function getUrl(Rocket $rocket): string
58 58
     {
59
-        return get_wechat_base_uri($rocket->getParams()).
59
+        return get_wechat_base_uri($rocket->getParams()) .
60 60
             $this->getUri($rocket);
61 61
     }
62 62
 
Please login to merge, or discard this patch.
src/Plugin/Wechat/SignPlugin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
 
60 60
         $uri = $request->getUri();
61 61
 
62
-        return $request->getMethod()."\n".
63
-            $uri->getPath().(empty($uri->getQuery()) ? '' : '?'.$uri->getQuery())."\n".
64
-            $timestamp."\n".
65
-            $random."\n".
66
-            $this->payloadToString($rocket->getPayload())."\n";
62
+        return $request->getMethod() . "\n" .
63
+            $uri->getPath() . (empty($uri->getQuery()) ? '' : '?' . $uri->getQuery()) . "\n" .
64
+            $timestamp . "\n" .
65
+            $random . "\n" .
66
+            $this->payloadToString($rocket->getPayload()) . "\n";
67 67
     }
68 68
 
69 69
     /**
Please login to merge, or discard this patch.
src/Functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 
59 59
         if (Str::endsWith($key, ['.crt', '.pem'])) {
60 60
             return openssl_pkey_get_private(
61
-                Str::startsWith($key, 'file://') ? $key : 'file://'.$key
61
+                Str::startsWith($key, 'file://') ? $key : 'file://' . $key
62 62
             );
63 63
         }
64 64
 
65
-        return "-----BEGIN RSA PRIVATE KEY-----\n".
66
-            wordwrap($key, 64, "\n", true).
65
+        return "-----BEGIN RSA PRIVATE KEY-----\n" .
66
+            wordwrap($key, 64, "\n", true) .
67 67
             "\n-----END RSA PRIVATE KEY-----";
68 68
     }
69 69
 }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             get_wechat_sign($params, $contents),
160 160
         );
161 161
 
162
-        return 'WECHATPAY2-SHA256-RSA2048 '.$auth;
162
+        return 'WECHATPAY2-SHA256-RSA2048 ' . $auth;
163 163
     }
164 164
 }
165 165
 
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
         $sign = $message->getHeaderLine('Wechatpay-Signature');
208 208
         $body = $message->getBody()->getContents();
209 209
 
210
-        $content = $timestamp."\n".$random."\n".$body."\n";
211
-        $public = get_wechat_config($params)->get('wechat_public_cert_path.'.$wechatSerial);
210
+        $content = $timestamp . "\n" . $random . "\n" . $body . "\n";
211
+        $public = get_wechat_config($params)->get('wechat_public_cert_path.' . $wechatSerial);
212 212
 
213 213
         if (empty($sign)) {
214 214
             throw new InvalidResponseException(InvalidResponseException::INVALID_RESPONSE_SIGN, '', ['headers' => $message->getHeaders(), 'body' => $body]);
Please login to merge, or discard this patch.