Passed
Pull Request — master (#579)
by Songda
03:10
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/ContainerServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         }
38 38
 
39 39
         foreach ($this->detectApplication as $framework => $application) {
40
-            if (class_exists($application) && $this->{$framework.'Application'}()) {
40
+            if (class_exists($application) && $this->{$framework . 'Application'}()) {
41 41
                 return;
42 42
             }
43 43
         }
@@ -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
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function thinkApplication(): bool
70 70
     {
71
-        Pay::setContainer(static function () {
71
+        Pay::setContainer(static function() {
72 72
             return ThinkContainer::getInstance();
73 73
         });
74 74
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             return false;
90 90
         }
91 91
 
92
-        Pay::setContainer(static function () {
92
+        Pay::setContainer(static function() {
93 93
             return HyperfApplication::getContainer();
94 94
         });
95 95
 
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.