Passed
Push — master ( df334d...db8528 )
by Songda
03:29 queued 01:21
created

JsbServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 11
rs 10
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\Jsb;
11
12
class JsbServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * @throws ContainerException
16
     */
17
    public function register(mixed $data = null): void
18
    {
19
        $service = new Jsb();
20
21
        Pay::set(Jsb::class, $service);
22
        Pay::set('jsb', $service);
23
    }
24
}
25