Passed
Branch master (afcd62)
by Songda
02:00
created
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
             return 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
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
         $sign = $message->getHeaderLine('Wechatpay-Signature');
198 198
         $body = $message->getBody()->getContents();
199 199
 
200
-        $content = $timestamp."\n".$random."\n".$body."\n";
201
-        $public = get_wechat_config($params)->get('wechat_public_cert_path.'.$wechatSerial);
200
+        $content = $timestamp . "\n" . $random . "\n" . $body . "\n";
201
+        $public = get_wechat_config($params)->get('wechat_public_cert_path.' . $wechatSerial);
202 202
 
203 203
         if (empty($sign)) {
204 204
             throw new InvalidResponseException(Exception::INVALID_RESPONSE_SIGN, '', ['headers' => $message->getHeaders(), 'body' => $body]);
Please login to merge, or discard this patch.
src/Pay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
 
127 127
             // laravel
128 128
             if (method_exists($container, 'singleton')) {
129
-                $container->singleton($name, $value instanceof Closure ? $value : static function () use ($value) {
129
+                $container->singleton($name, $value instanceof Closure ? $value : static function() use ($value) {
130 130
                     return $value;
131 131
                 });
132 132
 
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($data = null): void
19 19
     {
20
-        $service = static function () {
20
+        $service = static 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/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($data = null): void
19 19
     {
20
-        $service = static function () {
20
+        $service = static 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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         }
36 36
 
37 37
         foreach ($this->detectApplication as $framework => $application) {
38
-            $method = $framework.'Application';
38
+            $method = $framework . 'Application';
39 39
 
40 40
             if (class_exists($application) && method_exists($this, $method) && $this->{$method}()) {
41 41
                 return;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     protected function laravelApplication(): bool
53 53
     {
54
-        Pay::setContainer(static function () {
54
+        Pay::setContainer(static function() {
55 55
             return LaravelContainer::getInstance();
56 56
         });
57 57
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             return false;
73 73
         }
74 74
 
75
-        Pay::setContainer(static function () {
75
+        Pay::setContainer(static function() {
76 76
             return HyperfApplication::getContainer();
77 77
         });
78 78
 
Please login to merge, or discard this patch.