Passed
Push — master ( 3d7940...1cbe8d )
by Songda
11:44 queued 09:30
created
src/Plugin/Wechat/V3/Pay/Jsapi/ClosePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
             ->setPayload(array_merge(
51 51
                 [
52 52
                     '_method' => 'POST',
53
-                    '_url' => 'v3/pay/transactions/out-trade-no/'.$outTradeNo.'/close',
54
-                    '_service_url' => 'v3/pay/partner/transactions/out-trade-no/'.$outTradeNo.'/close',
53
+                    '_url' => 'v3/pay/transactions/out-trade-no/' . $outTradeNo . '/close',
54
+                    '_service_url' => 'v3/pay/partner/transactions/out-trade-no/' . $outTradeNo . '/close',
55 55
                 ],
56 56
                 $data ?? $this->normal($config)
57 57
             ));
Please login to merge, or discard this patch.
src/Provider/Wechat.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
      * @throws InvalidParamsException
57 57
      * @throws ServiceNotFoundException
58 58
      */
59
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface
59
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface
60 60
     {
61
-        $plugin = '\Yansongda\Pay\Shortcut\Wechat\\'.Str::studly($shortcut).'Shortcut';
61
+        $plugin = '\Yansongda\Pay\Shortcut\Wechat\\' . Str::studly($shortcut) . 'Shortcut';
62 62
 
63 63
         return Artful::shortcut($plugin, ...$params);
64 64
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @throws ContainerException
68 68
      * @throws InvalidParamsException
69 69
      */
70
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
70
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
71 71
     {
72 72
         return Artful::artful($plugins, $params);
73 73
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @throws InvalidParamsException
78 78
      * @throws ServiceNotFoundException
79 79
      */
80
-    public function query(array $order): Collection|Rocket
80
+    public function query(array $order): Collection | Rocket
81 81
     {
82 82
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
83 83
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * @throws InvalidParamsException
89 89
      */
90
-    public function cancel(array $order): Collection|Rocket
90
+    public function cancel(array $order): Collection | Rocket
91 91
     {
92 92
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, '参数异常: 微信不支持 cancel API');
93 93
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @throws InvalidParamsException
98 98
      * @throws ServiceNotFoundException
99 99
      */
100
-    public function close(array $order): Collection|Rocket
100
+    public function close(array $order): Collection | Rocket
101 101
     {
102 102
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
103 103
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @throws InvalidParamsException
112 112
      * @throws ServiceNotFoundException
113 113
      */
114
-    public function refund(array $order): Collection|Rocket
114
+    public function refund(array $order): Collection | Rocket
115 115
     {
116 116
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
117 117
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @throws ContainerException
123 123
      * @throws InvalidParamsException
124 124
      */
125
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
125
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket
126 126
     {
127 127
         $request = $this->getCallbackParams($contents);
128 128
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         );
153 153
     }
154 154
 
155
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): ServerRequestInterface
155
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): ServerRequestInterface
156 156
     {
157 157
         if (is_array($contents) && isset($contents['body'], $contents['headers'])) {
158 158
             return new ServerRequest('POST', 'http://localhost', $contents['headers'], $contents['body']);
Please login to merge, or discard this patch.
src/Provider/Alipay.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      * @throws InvalidParamsException
53 53
      * @throws ServiceNotFoundException
54 54
      */
55
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface|Rocket
55
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface | Rocket
56 56
     {
57
-        $plugin = '\Yansongda\Pay\Shortcut\Alipay\\'.Str::studly($shortcut).'Shortcut';
57
+        $plugin = '\Yansongda\Pay\Shortcut\Alipay\\' . Str::studly($shortcut) . 'Shortcut';
58 58
 
59 59
         return Artful::shortcut($plugin, ...$params);
60 60
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @throws ContainerException
64 64
      * @throws InvalidParamsException
65 65
      */
66
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
66
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
67 67
     {
68 68
         return Artful::artful($plugins, $params);
69 69
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @throws InvalidParamsException
74 74
      * @throws ServiceNotFoundException
75 75
      */
76
-    public function query(array $order): Collection|Rocket
76
+    public function query(array $order): Collection | Rocket
77 77
     {
78 78
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
79 79
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @throws InvalidParamsException
86 86
      * @throws ServiceNotFoundException
87 87
      */
88
-    public function cancel(array $order): Collection|Rocket
88
+    public function cancel(array $order): Collection | Rocket
89 89
     {
90 90
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @throws InvalidParamsException
98 98
      * @throws ServiceNotFoundException
99 99
      */
100
-    public function close(array $order): Collection|Rocket
100
+    public function close(array $order): Collection | Rocket
101 101
     {
102 102
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
103 103
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @throws InvalidParamsException
110 110
      * @throws ServiceNotFoundException
111 111
      */
112
-    public function refund(array $order): Collection|Rocket
112
+    public function refund(array $order): Collection | Rocket
113 113
     {
114 114
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
115 115
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * @throws ContainerException
121 121
      * @throws InvalidParamsException
122 122
      */
123
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection
123
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection
124 124
     {
125 125
         $request = $this->getCallbackParams($contents);
126 126
 
@@ -143,15 +143,14 @@  discard block
 block discarded – undo
143 143
         );
144 144
     }
145 145
 
146
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): Collection
146
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): Collection
147 147
     {
148 148
         if (is_array($contents)) {
149 149
             return Collection::wrap($contents);
150 150
         }
151 151
 
152 152
         if ($contents instanceof ServerRequestInterface) {
153
-            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() :
154
-                $contents->getParsedBody());
153
+            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : $contents->getParsedBody());
155 154
         }
156 155
 
157 156
         $request = ServerRequest::fromGlobals();
Please login to merge, or discard this patch.
src/Provider/Unipay.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
      * @throws InvalidParamsException
50 50
      * @throws ServiceNotFoundException
51 51
      */
52
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface|Rocket
52
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface | Rocket
53 53
     {
54
-        $plugin = '\Yansongda\Pay\Shortcut\Unipay\\'.Str::studly($shortcut).'Shortcut';
54
+        $plugin = '\Yansongda\Pay\Shortcut\Unipay\\' . Str::studly($shortcut) . 'Shortcut';
55 55
 
56 56
         return Artful::shortcut($plugin, ...$params);
57 57
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @throws ContainerException
61 61
      * @throws InvalidParamsException
62 62
      */
63
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
63
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
64 64
     {
65 65
         return Artful::artful($plugins, $params);
66 66
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @throws InvalidParamsException
71 71
      * @throws ServiceNotFoundException
72 72
      */
73
-    public function query(array $order): Collection|Rocket
73
+    public function query(array $order): Collection | Rocket
74 74
     {
75 75
         Event::dispatch(new MethodCalled('unipay', __METHOD__, $order, null));
76 76
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @throws InvalidParamsException
83 83
      * @throws ServiceNotFoundException
84 84
      */
85
-    public function cancel(array $order): Collection|Rocket
85
+    public function cancel(array $order): Collection | Rocket
86 86
     {
87 87
         Event::dispatch(new MethodCalled('unipay', __METHOD__, $order, null));
88 88
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * @throws InvalidParamsException
94 94
      */
95
-    public function close(array $order): Collection|Rocket
95
+    public function close(array $order): Collection | Rocket
96 96
     {
97 97
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, '参数异常: 银联不支持 close API');
98 98
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @throws InvalidParamsException
103 103
      * @throws ServiceNotFoundException
104 104
      */
105
-    public function refund(array $order): Collection|Rocket
105
+    public function refund(array $order): Collection | Rocket
106 106
     {
107 107
         Event::dispatch(new MethodCalled('unipay', __METHOD__, $order, null));
108 108
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @throws ContainerException
114 114
      * @throws InvalidParamsException
115 115
      */
116
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
116
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket
117 117
     {
118 118
         $request = $this->getCallbackParams($contents);
119 119
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         );
140 140
     }
141 141
 
142
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): Collection
142
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): Collection
143 143
     {
144 144
         if (is_array($contents)) {
145 145
             return Collection::wrap($contents);
Please login to merge, or discard this patch.