Passed
Pull Request — master (#803)
by Songda
01:54
created
src/Functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         return file_get_contents($key);
76 76
     }
77 77
 
78
-    return "-----BEGIN RSA PRIVATE KEY-----\n".
79
-        wordwrap($key, 64, "\n", true).
78
+    return "-----BEGIN RSA PRIVATE KEY-----\n" .
79
+        wordwrap($key, 64, "\n", true) .
80 80
         "\n-----END RSA PRIVATE KEY-----";
81 81
 }
82 82
 
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
     $buff = '';
167 167
 
168 168
     foreach ($payload as $k => $v) {
169
-        $buff .= ('sign' != $k && '' != $v && !is_array($v)) ? $k.'='.$v.'&' : '';
169
+        $buff .= ('sign' != $k && '' != $v && !is_array($v)) ? $k . '=' . $v . '&' : '';
170 170
     }
171 171
 
172
-    $sign = md5($buff.'key='.$key);
172
+    $sign = md5($buff . 'key=' . $key);
173 173
 
174 174
     return $upper ? strtoupper($sign) : $sign;
175 175
 }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     $sign = $message->getHeaderLine('Wechatpay-Signature');
194 194
     $body = (string) $message->getBody();
195 195
 
196
-    $content = $timestamp."\n".$random."\n".$body."\n";
196
+    $content = $timestamp . "\n" . $random . "\n" . $body . "\n";
197 197
     $public = get_wechat_config($params)['wechat_public_cert_path'][$wechatSerial] ?? null;
198 198
 
199 199
     if (empty($sign)) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     $wechatConfig = get_wechat_config($params);
247 247
 
248 248
     Pay::get(ConfigInterface::class)->set(
249
-        'wechat.'.get_tenant($params).'.wechat_public_cert_path',
249
+        'wechat.' . get_tenant($params) . '.wechat_public_cert_path',
250 250
         ((array) ($wechatConfig['wechat_public_cert_path'] ?? [])) + ($certs ?? []),
251 251
     );
252 252
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     }
278 278
 
279 279
     foreach ($config['wechat_public_cert_path'] as $serialNo => $cert) {
280
-        file_put_contents($path.'/'.$serialNo.'.crt', $cert);
280
+        file_put_contents($path . '/' . $serialNo . '.crt', $cert);
281 281
     }
282 282
 }
283 283
 
Please login to merge, or discard this patch.