Passed
Push — master ( e73c8b...2ea20b )
by Songda
04:10 queued 02:00
created

DouyinServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Service;
6
7
use Yansongda\Artful\Contract\ServiceProviderInterface;
8
use Yansongda\Artful\Exception\ContainerException;
9
use Yansongda\Pay\Pay;
10
use Yansongda\Pay\Provider\Douyin;
11
12
class DouyinServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * @throws ContainerException
16
     */
17
    public function register(mixed $data = null): void
18
    {
19
        $service = new Douyin();
20
21
        Pay::set(Douyin::class, $service);
22
        Pay::set('douyin', $service);
23
    }
24
}
25