TraderServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 31
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A provides() 0 6 1
1
<?php
2
3
namespace Laratrade\Trader;
4
5
use Illuminate\Support\ServiceProvider;
6
use Laratrade\Trader\Contracts\Trader as TraderContract;
7
8
class TraderServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
17
    /**
18
     * Register the service provider.
19
     */
20
    public function register()
21
    {
22 4
        $this->app->singleton(TraderContract::class, function () {
23 4
            return new Trader;
24 4
        });
25 4
    }
26
27
    /**
28
     * Get the services provided by the provider.
29
     *
30
     * @return array
31
     */
32 2
    public function provides()
33
    {
34
        return [
35 2
            TraderContract::class,
36
        ];
37
    }
38
}
39