ServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 5 1
1
<?php
2
namespace Triadev\Es\Mapping\Provider;
3
4
use Illuminate\Foundation\AliasLoader;
5
use Triadev\Es\Mapping\Contract\ElasticsearchMappingContract;
6
use Triadev\Es\Mapping\ElasticsearchMapping;
7
use Triadev\Es\Mapping\Facade\ElasticMapping;
8
use Triadev\Es\Provider\ElasticsearchServiceProvider;
9
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
10
11
class ServiceProvider extends BaseServiceProvider
12
{
13
    /**
14
     * All of the container singletons that should be registered.
15
     *
16
     * @var array
17
     */
18
    public $singletons = [
19
        ElasticsearchMappingContract::class => ElasticsearchMapping::class
20
    ];
21
    
22
    /**
23
     * Register bindings in the container.
24
     *
25
     * @return void
26
     */
27 32
    public function register()
28
    {
29 32
        $this->app->register(ElasticsearchServiceProvider::class);
30
        
31 32
        AliasLoader::getInstance()->alias('ElasticMapping', ElasticMapping::class);
32 32
    }
33
}
34