Passed
Pull Request — master (#579)
by Songda
02:19
created
src/Service/WechatServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function register(?array $data = null): void
19 19
     {
20
-        $service = function () {
20
+        $service = function() {
21 21
             Pay::set(ParserInterface::class, CollectionParser::class);
22 22
 
23 23
             return new Wechat();
Please login to merge, or discard this patch.
src/Service/ContainerServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function register(?array $data = null): void
31 31
     {
32 32
         foreach ($this->detectApplication as $application) {
33
-            if (class_exists($application) && $this->{$application.'Application'}()) {
33
+            if (class_exists($application) && $this->{$application . 'Application'}()) {
34 34
                 return;
35 35
             }
36 36
         }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function laravelApplication(): bool
42 42
     {
43
-        Pay::setContainer(function () {
43
+        Pay::setContainer(function() {
44 44
             return LaravelContainer::getInstance();
45 45
         });
46 46
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     protected function thinkApplication(): bool
51 51
     {
52
-        Pay::setContainer(function () {
52
+        Pay::setContainer(function() {
53 53
             return ThinkContainer::getInstance();
54 54
         });
55 55
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             return false;
63 63
         }
64 64
 
65
-        Pay::setContainer(function () {
65
+        Pay::setContainer(function() {
66 66
             return HyperfApplication::getContainer();
67 67
         });
68 68
 
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
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function register(?array $data = null): void
19 19
     {
20
-        $service = function () {
20
+        $service = function() {
21 21
             Pay::set(ParserInterface::class, CollectionParser::class);
22 22
 
23 23
             return new Alipay();
Please login to merge, or discard this patch.
src/Functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
             $key = file_get_contents($key);
57 57
         }
58 58
 
59
-        return "-----BEGIN RSA PRIVATE KEY-----\n".
60
-            wordwrap($key, 64, "\n", true).
59
+        return "-----BEGIN RSA PRIVATE KEY-----\n" .
60
+            wordwrap($key, 64, "\n", true) .
61 61
             "\n-----END RSA PRIVATE KEY-----";
62 62
     }
63 63
 }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             get_wechat_sign($params, $contents),
150 150
         );
151 151
 
152
-        return 'WECHATPAY2-SHA256-RSA2048 '.$auth;
152
+        return 'WECHATPAY2-SHA256-RSA2048 ' . $auth;
153 153
     }
154 154
 }
155 155
 
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
         $sign = $message->getHeaderLine('Wechatpay-Signature');
202 202
         $body = $message->getBody()->getContents();
203 203
 
204
-        $content = $timestamp."\n".$random."\n".$body."\n";
205
-        $public = get_wechat_config($params)->get('wechat_public_cert_path.'.$wechatSerial);
204
+        $content = $timestamp . "\n" . $random . "\n" . $body . "\n";
205
+        $public = get_wechat_config($params)->get('wechat_public_cert_path.' . $wechatSerial);
206 206
 
207 207
         if (empty($sign)) {
208 208
             throw new InvalidResponseException(Exception::INVALID_RESPONSE_SIGN, '', ['headers' => $message->getHeaders(), 'body' => $body]);
Please login to merge, or discard this patch.