AgentServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 43
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
A provides() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\Agent;
6
7
use Arcanedev\Support\Providers\PackageServiceProvider;
8
use Illuminate\Contracts\Support\DeferrableProvider;
9
10
/**
11
 * Class     AgentServiceProvider
12
 *
13
 * @author   ARCANEDEV <[email protected]>
14
 */
15
class AgentServiceProvider extends PackageServiceProvider implements DeferrableProvider
16
{
17
    /* -----------------------------------------------------------------
18
     |  Properties
19
     | -----------------------------------------------------------------
20
     */
21
22
    /**
23
     * Package name.
24
     *
25
     * @var string
26
     */
27
    protected $package = 'agent';
28
29
    /* -----------------------------------------------------------------
30
     |  Main Methods
31
     | -----------------------------------------------------------------
32
     */
33
34
    /**
35
     * Register the service provider.
36
     */
37 396
    public function register(): void
38
    {
39 396
        parent::register();
40
41 396
        $this->registerConfig();
42
43 132
        $this->singleton(Contracts\Agent::class, Agent::class);
44 396
    }
45
46
    /**
47
     * Get the services provided by the provider.
48
     *
49
     * @return array
50
     */
51 4
    public function provides(): array
52
    {
53
        return [
54 4
            Contracts\Agent::class,
55
        ];
56
    }
57
}
58