Passed
Push — master ( 013b57...d213bb )
by Songda
02:56
created

UnbindPlugin::assembly()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 2
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Alipay\V2\Fund\Royalty\Relation;
6
7
use Closure;
8
use Yansongda\Artful\Contract\PluginInterface;
9
use Yansongda\Artful\Logger;
10
use Yansongda\Artful\Rocket;
11
12
/**
13
 * @see https://opendocs.alipay.com/open/3613f4e1_alipay.trade.royalty.relation.unbind?pathHash=5a880175&ref=api&scene=common
14
 */
15
class UnbindPlugin implements PluginInterface
16
{
17
    public function assembly(Rocket $rocket, Closure $next): Rocket
18
    {
19
        Logger::debug('[Alipay][Fund][Royalty][Relation][UnbindPlugin] 插件开始装载', ['rocket' => $rocket]);
20
21
        $rocket->mergePayload([
22
            'method' => 'alipay.trade.royalty.relation.unbind',
23
            'biz_content' => $rocket->getParams(),
24
        ]);
25
26
        Logger::info('[Alipay][Fund][Royalty][Relation][UnbindPlugin] 插件装载完毕', ['rocket' => $rocket]);
27
28
        return $next($rocket);
29
    }
30
}
31