Passed
Push — master ( 3555f1...b8da0a )
by Songda
06:22 queued 03:53
created

PayListener::artfulStart()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay;
6
7
use Yansongda\Artful\Event\ArtfulEnd;
8
use Yansongda\Artful\Event\ArtfulStart;
9
use Yansongda\Artful\Event\HttpEnd;
10
use Yansongda\Artful\Event\HttpStart;
11
use Yansongda\Pay\Event\PayEnd;
12
use Yansongda\Pay\Event\PayStart;
13
14
class PayListener
15
{
16
    public static function artfulStart(ArtfulStart $event): void
17
    {
18
        Event::dispatch(new PayStart($event->plugins, $event->params));
19
    }
20
21
    public static function artfulEnd(ArtfulEnd $event): void
22
    {
23
        Event::dispatch(new PayEnd($event->rocket));
24
    }
25
26
    public static function httpStart(HttpStart $event): void
27
    {
28
        Event::dispatch(new Event\HttpStart($event->rocket));
29
    }
30
31
    public static function httpEnd(HttpEnd $event): void
32
    {
33
        Event::dispatch(new Event\HttpEnd($event->rocket));
34
    }
35
}
36