Passed
Push — master ( ad4c5d...439d1b )
by Songda
02:35 queued 36s
created

QueryConfigPlugin::assembly()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 12
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Wechat\V3\Marketing\Fapiao;
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://pay.weixin.qq.com/docs/merchant/apis/fapiao/fapiao-merchant/query-development-config.html
14
 */
15
class QueryConfigPlugin implements PluginInterface
16
{
17
    public function assembly(Rocket $rocket, Closure $next): Rocket
18
    {
19
        Logger::debug('[Wechat][V3][Marketing][Fapiao][QueryConfigPlugin] 插件开始装载', ['rocket' => $rocket]);
20
21
        $rocket->setPayload([
22
            '_method' => 'GET',
23
            '_url' => 'v3/new-tax-control-fapiao/merchant/development-config',
24
        ]);
25
26
        Logger::info('[Wechat][V3][Marketing][Fapiao][QueryConfigPlugin] 插件装载完毕', ['rocket' => $rocket]);
27
28
        return $next($rocket);
29
    }
30
}
31