@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @throws InvalidParamsException |
| 36 | 36 | * @throws ServiceNotFoundException |
| 37 | 37 | */ |
| 38 | - public function call(string $plugin, array $params = []): Collection|MessageInterface|array|null |
|
| 38 | + public function call(string $plugin, array $params = []): Collection | MessageInterface | array | null |
|
| 39 | 39 | { |
| 40 | 40 | if (!class_exists($plugin) || !in_array(ShortcutInterface::class, class_implements($plugin))) { |
| 41 | 41 | throw new InvalidParamsException(Exception::SHORTCUT_NOT_FOUND, "[{$plugin}] is not incompatible"); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @throws ContainerException |
| 58 | 58 | * @throws InvalidParamsException |
| 59 | 59 | */ |
| 60 | - public function pay(array $plugins, array $params): Collection|MessageInterface|array|null |
|
| 60 | + public function pay(array $plugins, array $params): Collection | MessageInterface | array | null |
|
| 61 | 61 | { |
| 62 | 62 | Logger::info('[AbstractProvider] 即将进行 pay 操作', func_get_args()); |
| 63 | 63 | |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function __call(string $shortcut, array $params) |
| 45 | 45 | { |
| 46 | - $plugin = '\\Yansongda\\Pay\\Plugin\\Unipay\\Shortcut\\'. |
|
| 47 | - Str::studly($shortcut).'Shortcut'; |
|
| 46 | + $plugin = '\\Yansongda\\Pay\\Plugin\\Unipay\\Shortcut\\' . |
|
| 47 | + Str::studly($shortcut) . 'Shortcut'; |
|
| 48 | 48 | |
| 49 | 49 | return $this->call($plugin, ...$params); |
| 50 | 50 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @throws InvalidParamsException |
| 55 | 55 | * @throws ServiceNotFoundException |
| 56 | 56 | */ |
| 57 | - public function find(array|string $order): Collection|array |
|
| 57 | + public function find(array | string $order): Collection | array |
|
| 58 | 58 | { |
| 59 | 59 | if (!is_array($order)) { |
| 60 | 60 | throw new InvalidParamsException(Exception::UNIPAY_FIND_STRING_NOT_SUPPORTED); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @throws InvalidParamsException |
| 71 | 71 | * @throws ServiceNotFoundException |
| 72 | 72 | */ |
| 73 | - public function cancel(array|string $order): Collection|array|null |
|
| 73 | + public function cancel(array | string $order): Collection | array | null |
|
| 74 | 74 | { |
| 75 | 75 | if (!is_array($order)) { |
| 76 | 76 | throw new InvalidParamsException(Exception::UNIPAY_CANCEL_STRING_NOT_SUPPORTED); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * @throws InvalidParamsException |
| 86 | 86 | */ |
| 87 | - public function close(array|string $order): Collection|array|null |
|
| 87 | + public function close(array | string $order): Collection | array | null |
|
| 88 | 88 | { |
| 89 | 89 | throw new InvalidParamsException(Exception::METHOD_NOT_SUPPORTED, 'Unipay does not support close api'); |
| 90 | 90 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @throws InvalidParamsException |
| 95 | 95 | * @throws ServiceNotFoundException |
| 96 | 96 | */ |
| 97 | - public function refund(array $order): Collection|array |
|
| 97 | + public function refund(array $order): Collection | array |
|
| 98 | 98 | { |
| 99 | 99 | Event::dispatch(new Event\MethodCalled('unipay', __METHOD__, $order, null)); |
| 100 | 100 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @throws ContainerException |
| 106 | 106 | * @throws InvalidParamsException |
| 107 | 107 | */ |
| 108 | - public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection |
|
| 108 | + public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection |
|
| 109 | 109 | { |
| 110 | 110 | $request = $this->getCallbackParams($contents); |
| 111 | 111 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | ); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): Collection |
|
| 135 | + protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): Collection |
|
| 136 | 136 | { |
| 137 | 137 | if (is_array($contents)) { |
| 138 | 138 | return Collection::wrap($contents); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | private string $direction = DirectionInterface::class; |
| 33 | 33 | |
| 34 | - private array|null|MessageInterface|Collection $destination = null; |
|
| 34 | + private array | null | MessageInterface | Collection $destination = null; |
|
| 35 | 35 | |
| 36 | 36 | private ?MessageInterface $destinationOrigin = null; |
| 37 | 37 | |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | return $this; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - public function getDestination(): Collection|MessageInterface|array|null |
|
| 116 | + public function getDestination(): Collection | MessageInterface | array | null |
|
| 117 | 117 | { |
| 118 | 118 | return $this->destination; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - public function setDestination(Collection|MessageInterface|array|null $destination): Rocket |
|
| 121 | + public function setDestination(Collection | MessageInterface | array | null $destination): Rocket |
|
| 122 | 122 | { |
| 123 | 123 | $this->destination = $destination; |
| 124 | 124 | |