StartPlugin::assembly()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 9
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Wechat;
6
7
use Closure;
8
use JetBrains\PhpStorm\Deprecated;
9
use Yansongda\Artful\Contract\PluginInterface;
10
use Yansongda\Artful\Logger;
11
use Yansongda\Artful\Rocket;
12
13
#[Deprecated(reason: '自 v3.7.5 版本已废弃', replacement: '`yansongda/artful` 包中的 `Yansongda\Artful\Plugin\StartPlugin`')]
14
class StartPlugin implements PluginInterface
15
{
16
    public function assembly(Rocket $rocket, Closure $next): Rocket
17
    {
18
        Logger::debug('[Wechat][StartPlugin] 插件开始装载', ['rocket' => $rocket]);
19
20
        $rocket->mergePayload($rocket->getParams());
21
22
        Logger::info('[Wechat][StartPlugin] 插件装载完毕', ['rocket' => $rocket]);
23
24
        return $next($rocket);
25
    }
26
}
27