DouyinServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 1
b 0
f 0
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