@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | Pay::set(ParserInterface::class, CollectionParser::class); |
| 18 | 18 | |
| 19 | - $service = function () { |
|
| 19 | + $service = function() { |
|
| 20 | 20 | return new Alipay(); |
| 21 | 21 | }; |
| 22 | 22 | |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function __call(string $shortcut, array $params) |
| 38 | 38 | { |
| 39 | - $plugin = '\\Yansongda\\Pay\\Plugin\\Alipay\\Shortcut\\'. |
|
| 40 | - Str::studly($shortcut).'Shortcut'; |
|
| 39 | + $plugin = '\\Yansongda\\Pay\\Plugin\\Alipay\\Shortcut\\' . |
|
| 40 | + Str::studly($shortcut) . 'Shortcut'; |
|
| 41 | 41 | |
| 42 | 42 | if (!class_exists($plugin) || !in_array(ShortcutInterface::class, class_implements($plugin))) { |
| 43 | 43 | throw new InvalidParamsException(InvalidParamsException::SHORTCUT_NOT_FOUND, "[$plugin] is not incompatible"); |
@@ -145,8 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | if ($contents instanceof ServerRequestInterface) { |
| 148 | - return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : |
|
| 149 | - $contents->getParsedBody()); |
|
| 148 | + return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : $contents->getParsedBody()); |
|
| 150 | 149 | } |
| 151 | 150 | |
| 152 | 151 | $request = ServerRequest::fromGlobals(); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | protected function filterPayload(Rocket $rocket): void |
| 46 | 46 | { |
| 47 | - $payload = (new Collection($rocket->getParams()))->filter(function ($v, $k) { |
|
| 47 | + $payload = (new Collection($rocket->getParams()))->filter(function($v, $k) { |
|
| 48 | 48 | return '' !== $v && !is_null($v) && 'sign' != $k && 'sign_type' != $k; |
| 49 | 49 | }); |
| 50 | 50 | |
@@ -80,6 +80,6 @@ |
||
| 80 | 80 | { |
| 81 | 81 | $method = $rocket->getPayload()->get('method'); |
| 82 | 82 | |
| 83 | - return str_replace('.', '_', $method).'_response'; |
|
| 83 | + return str_replace('.', '_', $method) . '_response'; |
|
| 84 | 84 | } |
| 85 | 85 | } |
@@ -38,11 +38,11 @@ |
||
| 38 | 38 | |
| 39 | 39 | protected function filterPayload(Rocket $rocket): void |
| 40 | 40 | { |
| 41 | - $payload = $rocket->getPayload()->filter(function ($v, $k) { |
|
| 41 | + $payload = $rocket->getPayload()->filter(function($v, $k) { |
|
| 42 | 42 | return '' !== $v && !is_null($v) && 'sign' != $k; |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - $contents = array_filter($payload->get('biz_content', []), function ($v, $k) { |
|
| 45 | + $contents = array_filter($payload->get('biz_content', []), function($v, $k) { |
|
| 46 | 46 | return !Str::startsWith($k, '_'); |
| 47 | 47 | }, ARRAY_FILTER_USE_BOTH); |
| 48 | 48 | |