@@ -45,7 +45,7 @@ |
||
| 45 | 45 | protected function formatPayload(Rocket $rocket): void |
| 46 | 46 | { |
| 47 | 47 | $payload = (new Collection($rocket->getParams())) |
| 48 | - ->filter(fn ($v, $k) => '' !== $v && !is_null($v) && 'sign' != $k && 'sign_type' != $k && !Str::startsWith($k, '_')); |
|
| 48 | + ->filter(fn($v, $k) => '' !== $v && !is_null($v) && 'sign' != $k && 'sign_type' != $k && !Str::startsWith($k, '_')); |
|
| 49 | 49 | |
| 50 | 50 | $rocket->setPayload($payload); |
| 51 | 51 | } |
@@ -36,9 +36,9 @@ |
||
| 36 | 36 | |
| 37 | 37 | protected function formatPayload(Rocket $rocket): void |
| 38 | 38 | { |
| 39 | - $payload = $rocket->getPayload()->filter(fn ($v, $k) => '' !== $v && !is_null($v) && 'sign' != $k); |
|
| 39 | + $payload = $rocket->getPayload()->filter(fn($v, $k) => '' !== $v && !is_null($v) && 'sign' != $k); |
|
| 40 | 40 | |
| 41 | - $contents = array_filter($payload->get('biz_content', []), fn ($v, $k) => !Str::startsWith(strval($k), '_'), ARRAY_FILTER_USE_BOTH); |
|
| 41 | + $contents = array_filter($payload->get('biz_content', []), fn($v, $k) => !Str::startsWith(strval($k), '_'), ARRAY_FILTER_USE_BOTH); |
|
| 42 | 42 | |
| 43 | 43 | $rocket->setPayload( |
| 44 | 44 | $payload->merge(['biz_content' => json_encode($contents)]) |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | |
| 26 | 26 | protected function getPayload(array $params): array |
| 27 | 27 | { |
| 28 | - return array_filter($params, fn ($v, $k) => !Str::startsWith(strval($k), '_'), ARRAY_FILTER_USE_BOTH); |
|
| 28 | + return array_filter($params, fn($v, $k) => !Str::startsWith(strval($k), '_'), ARRAY_FILTER_USE_BOTH); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | ->send((new Rocket())->setParams($params)->setPayload(new Collection())) |
| 68 | 68 | ->through($plugins) |
| 69 | 69 | ->via('assembly') |
| 70 | - ->then(fn ($rocket) => $this->ignite($rocket)); |
|
| 70 | + ->then(fn($rocket) => $this->ignite($rocket)); |
|
| 71 | 71 | |
| 72 | 72 | Event::dispatch(new Event\PayFinish($rocket)); |
| 73 | 73 | |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | // @phpstan-ignore-next-line |
| 124 | 124 | if ($container instanceof LaravelContainer) { |
| 125 | 125 | // @phpstan-ignore-next-line |
| 126 | - $container->singleton($name, $value instanceof Closure ? $value : static fn () => $value); |
|
| 126 | + $container->singleton($name, $value instanceof Closure ? $value : static fn() => $value); |
|
| 127 | 127 | |
| 128 | 128 | return; |
| 129 | 129 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | foreach ($this->detectApplication as $framework => $application) { |
| 38 | - $method = $framework.'Application'; |
|
| 38 | + $method = $framework . 'Application'; |
|
| 39 | 39 | |
| 40 | 40 | if (class_exists($application) && method_exists($this, $method) && $this->{$method}()) { |
| 41 | 41 | return; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | protected function laravelApplication(): bool |
| 53 | 53 | { |
| 54 | - Pay::setContainer(static fn () => LaravelContainer::getInstance()); |
|
| 54 | + Pay::setContainer(static fn() => LaravelContainer::getInstance()); |
|
| 55 | 55 | |
| 56 | 56 | Pay::set(\Yansongda\Pay\Contract\ContainerInterface::class, LaravelContainer::getInstance()); |
| 57 | 57 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | return false; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - Pay::setContainer(static fn () => HyperfApplication::getContainer()); |
|
| 75 | + Pay::setContainer(static fn() => HyperfApplication::getContainer()); |
|
| 76 | 76 | |
| 77 | 77 | Pay::set(\Yansongda\Pay\Contract\ContainerInterface::class, HyperfApplication::getContainer()); |
| 78 | 78 | |