Passed
Pull Request — master (#904)
by Songda
02:08
created
src/Provider/Wechat.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
      * @throws InvalidParamsException
52 52
      * @throws ServiceNotFoundException
53 53
      */
54
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface
54
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface
55 55
     {
56
-        $plugin = '\\Yansongda\\Pay\\Shortcut\\Wechat\\'.Str::studly($shortcut).'Shortcut';
56
+        $plugin = '\\Yansongda\\Pay\\Shortcut\\Wechat\\' . Str::studly($shortcut) . 'Shortcut';
57 57
 
58 58
         return $this->call($plugin, ...$params);
59 59
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @throws InvalidParamsException
64 64
      * @throws ServiceNotFoundException
65 65
      */
66
-    public function query(array $order): array|Collection
66
+    public function query(array $order): array | Collection
67 67
     {
68 68
         Event::dispatch(new Event\MethodCalled('wechat', __METHOD__, $order, null));
69 69
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * @throws InvalidParamsException
75 75
      */
76
-    public function cancel(array $order): null|array|Collection
76
+    public function cancel(array $order): null | array | Collection
77 77
     {
78 78
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Wechat does not support cancel api');
79 79
     }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @throws InvalidParamsException
84 84
      * @throws ServiceNotFoundException
85 85
      */
86
-    public function close(array $order): null|array|Collection
86
+    public function close(array $order): null | array | Collection
87 87
     {
88 88
         Event::dispatch(new Event\MethodCalled('wechat', __METHOD__, $order, null));
89 89
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @throws InvalidParamsException
98 98
      * @throws ServiceNotFoundException
99 99
      */
100
-    public function refund(array $order): array|Collection
100
+    public function refund(array $order): array | Collection
101 101
     {
102 102
         Event::dispatch(new Event\MethodCalled('wechat', __METHOD__, $order, null));
103 103
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @throws ContainerException
109 109
      * @throws InvalidParamsException
110 110
      */
111
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection
111
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection
112 112
     {
113 113
         $request = $this->getCallbackParams($contents);
114 114
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         );
140 140
     }
141 141
 
142
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): ServerRequestInterface
142
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): ServerRequestInterface
143 143
     {
144 144
         if (is_array($contents) && isset($contents['body'], $contents['headers'])) {
145 145
             return new ServerRequest('POST', 'http://localhost', $contents['headers'], $contents['body']);
Please login to merge, or discard this patch.