BinListServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 38
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A provides() 0 4 1
A registerBindings() 0 10 1
A register() 0 3 1
1
<?php
2
3
namespace DevinPearson\BinList;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * This is the BinList service provider class.
9
 */
10
class BinListServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Register the service provider.
14
     *
15
     * @return void
16
     */
17 21
    public function register(): void
18
    {
19 21
        $this->registerBindings();
20 21
    }
21
22
    /**
23
     * Register the factory class.
24
     *
25
     * @return void
26
     */
27 21
    protected function registerBindings(): void
28
    {
29 21
        $this->app->singleton(
30 21
            'binlist',
31
            function () {
32 6
                return new BinList();
33 21
            }
34
        );
35
36 21
        $this->app->alias('binlist', BinList::class);
37 21
    }
38
39
    /**
40
     * Get the services provided by the provider.
41
     *
42
     * @return string[]
43
     */
44 6
    public function provides(): array
45
    {
46
        return [
47 6
            'binlist',
48
        ];
49
    }
50
}
51