Passed
Push — master ( a1b58e...e12306 )
by Songda
02:52 queued 01:03
created
src/Functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 
61 61
         if (Str::endsWith($key, ['.crt', '.pem'])) {
62 62
             return openssl_pkey_get_private(
63
-                Str::startsWith($key, 'file://') ? $key : 'file://'.$key
63
+                Str::startsWith($key, 'file://') ? $key : 'file://' . $key
64 64
             );
65 65
         }
66 66
 
67
-        return "-----BEGIN RSA PRIVATE KEY-----\n".
68
-            wordwrap($key, 64, "\n", true).
67
+        return "-----BEGIN RSA PRIVATE KEY-----\n" .
68
+            wordwrap($key, 64, "\n", true) .
69 69
             "\n-----END RSA PRIVATE KEY-----";
70 70
     }
71 71
 }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             get_wechat_sign($params, $contents),
162 162
         );
163 163
 
164
-        return 'WECHATPAY2-SHA256-RSA2048 '.$auth;
164
+        return 'WECHATPAY2-SHA256-RSA2048 ' . $auth;
165 165
     }
166 166
 }
167 167
 
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
         $sign = $message->getHeaderLine('Wechatpay-Signature');
216 216
         $body = $message->getBody()->getContents();
217 217
 
218
-        $content = $timestamp."\n".$random."\n".$body."\n";
219
-        $public = get_wechat_config($params)->get('wechat_public_cert_path.'.$wechatSerial);
218
+        $content = $timestamp . "\n" . $random . "\n" . $body . "\n";
219
+        $public = get_wechat_config($params)->get('wechat_public_cert_path.' . $wechatSerial);
220 220
 
221 221
         if (empty($sign)) {
222 222
             throw new InvalidResponseException(Exception::INVALID_RESPONSE_SIGN, '', ['headers' => $message->getHeaders(), 'body' => $body]);
Please login to merge, or discard this patch.
src/Traits/HasWechatEncryption.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
     {
44 44
         $config = get_wechat_config($params);
45 45
 
46
-        $publicKey = $config->get('wechat_public_cert_path.'.$serialNo);
46
+        $publicKey = $config->get('wechat_public_cert_path.' . $serialNo);
47 47
 
48 48
         if (empty($publicKey)) {
49
-            throw new InvalidParamsException(Exception::WECHAT_SERIAL_NO_NOT_FOUND, 'Wechat serial no not found: '.$serialNo);
49
+            throw new InvalidParamsException(Exception::WECHAT_SERIAL_NO_NOT_FOUND, 'Wechat serial no not found: ' . $serialNo);
50 50
         }
51 51
 
52 52
         return $publicKey;
Please login to merge, or discard this patch.