Completed
Push — master ( 56c44b...57c31b )
by Songda
05:33 queued 11s
created

PayPlugin::apply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 15
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 15
loc 15
rs 9.7666
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Alipay\Trade;
6
7
use Closure;
8
use Yansongda\Pay\Contract\PluginInterface;
9
use Yansongda\Pay\Rocket;
10
11
class PayPlugin implements PluginInterface
12
{
13
    public function assembly(Rocket $rocket, Closure $next): Rocket
14
    {
15
        $rocket->mergePayload([
16
            'method' => 'alipay.trade.pay',
17
            'biz_content' => array_merge(
18
                [
19
                    'product_code' => 'FACE_TO_FACE_PAYMENT',
20
                    'scene' => 'bar_code',
21
                ],
22
                $rocket->getParams(),
23
            ),
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected ')'
Loading history...
24
        ]);
25
26
        return $next($rocket);
27
    }
28
}
29