These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Yansongda\Pay\Gateways\Alipay; |
||
4 | |||
5 | use Yansongda\Pay\Contracts\GatewayInterface; |
||
6 | use Yansongda\Pay\Events; |
||
7 | use Yansongda\Supports\Collection; |
||
8 | |||
9 | class RefundGateway |
||
10 | { |
||
11 | /** |
||
12 | * Find. |
||
13 | * |
||
14 | * @author yansongda <[email protected]> |
||
15 | * |
||
16 | * @param $order |
||
17 | * |
||
18 | * @return array |
||
19 | */ |
||
20 | View Code Duplication | public function find($order): array |
|
0 ignored issues
–
show
|
|||
21 | { |
||
22 | return [ |
||
23 | 'method' => 'alipay.trade.fastpay.refund.query', |
||
24 | 'biz_content' => json_encode(is_array($order) ? $order : ['out_trade_no' => $order]) |
||
25 | ]; |
||
26 | } |
||
27 | } |
||
28 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.