StartPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A assembly() 0 9 1
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