| @@ -53,9 +53,9 @@ discard block | ||
| 53 | 53 | * @throws InvalidParamsException | 
| 54 | 54 | * @throws ServiceNotFoundException | 
| 55 | 55 | */ | 
| 56 | - public function __call(string $shortcut, array $params): null|Collection|MessageInterface|Rocket | |
| 56 | + public function __call(string $shortcut, array $params): null | Collection | MessageInterface | Rocket | |
| 57 | 57 |      { | 
| 58 | - $plugin = '\Yansongda\Pay\Shortcut\Alipay\\'.Str::studly($shortcut).'Shortcut'; | |
| 58 | + $plugin = '\Yansongda\Pay\Shortcut\Alipay\\' . Str::studly($shortcut) . 'Shortcut'; | |
| 59 | 59 | |
| 60 | 60 | return Artful::shortcut($plugin, ...$params); | 
| 61 | 61 | } | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | * @throws ContainerException | 
| 65 | 65 | * @throws InvalidParamsException | 
| 66 | 66 | */ | 
| 67 | - public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket | |
| 67 | + public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket | |
| 68 | 68 |      { | 
| 69 | 69 | return Artful::artful($plugins, $params); | 
| 70 | 70 | } | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | * @throws InvalidParamsException | 
| 75 | 75 | * @throws ServiceNotFoundException | 
| 76 | 76 | */ | 
| 77 | - public function query(array $order): Collection|Rocket | |
| 77 | + public function query(array $order): Collection | Rocket | |
| 78 | 78 |      { | 
| 79 | 79 |          Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null)); | 
| 80 | 80 | |
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | * @throws InvalidParamsException | 
| 87 | 87 | * @throws ServiceNotFoundException | 
| 88 | 88 | */ | 
| 89 | - public function cancel(array $order): Collection|Rocket | |
| 89 | + public function cancel(array $order): Collection | Rocket | |
| 90 | 90 |      { | 
| 91 | 91 |          Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null)); | 
| 92 | 92 | |
| @@ -98,7 +98,7 @@ discard block | ||
| 98 | 98 | * @throws InvalidParamsException | 
| 99 | 99 | * @throws ServiceNotFoundException | 
| 100 | 100 | */ | 
| 101 | - public function close(array $order): Collection|Rocket | |
| 101 | + public function close(array $order): Collection | Rocket | |
| 102 | 102 |      { | 
| 103 | 103 |          Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null)); | 
| 104 | 104 | |
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | * @throws InvalidParamsException | 
| 111 | 111 | * @throws ServiceNotFoundException | 
| 112 | 112 | */ | 
| 113 | - public function refund(array $order): Collection|Rocket | |
| 113 | + public function refund(array $order): Collection | Rocket | |
| 114 | 114 |      { | 
| 115 | 115 |          Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null)); | 
| 116 | 116 | |
| @@ -121,7 +121,7 @@ discard block | ||
| 121 | 121 | * @throws ContainerException | 
| 122 | 122 | * @throws InvalidParamsException | 
| 123 | 123 | */ | 
| 124 | - public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection | |
| 124 | + public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | |
| 125 | 125 |      { | 
| 126 | 126 | $request = $this->getCallbackParams($contents); | 
| 127 | 127 | |
| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 | * @throws ContainerException | 
| 135 | 135 | * @throws InvalidParamsException | 
| 136 | 136 | */ | 
| 137 | - public function appCallback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection | |
| 137 | + public function appCallback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | |
| 138 | 138 |      { | 
| 139 | 139 | $request = $this->getCallbackParams($contents); | 
| 140 | 140 | |
| @@ -155,15 +155,14 @@ discard block | ||
| 155 | 155 | ); | 
| 156 | 156 | } | 
| 157 | 157 | |
| 158 | - protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): Collection | |
| 158 | + protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): Collection | |
| 159 | 159 |      { | 
| 160 | 160 |          if (is_array($contents)) { | 
| 161 | 161 | return Collection::wrap($contents); | 
| 162 | 162 | } | 
| 163 | 163 | |
| 164 | 164 |          if ($contents instanceof ServerRequestInterface) { | 
| 165 | -            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : | |
| 166 | - $contents->getParsedBody()); | |
| 165 | +            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : $contents->getParsedBody()); | |
| 167 | 166 | } | 
| 168 | 167 | |
| 169 | 168 | $request = ServerRequest::fromGlobals(); |