Completed
Push — master ( 59f74a...c12486 )
by Mahmoud
03:24
created

MainServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 2
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 4 1
1
<?php
2
3
namespace App\Containers\User\Providers;
4
5
use App\Containers\User\Contracts\UserRepositoryInterface;
6
use App\Containers\User\Data\Repositories\UserRepository;
7
use App\Port\Provider\Abstracts\ServiceProviderAbstract;
8
9
/**
10
 * Class MainServiceProvider.
11
 *
12
 * The Main Service Provider of this container, it will be automatically registered in the framework.
13
 *
14
 * @author  Mahmoud Zalt <[email protected]>
15
 */
16
class MainServiceProvider extends ServiceProviderAbstract
17
{
18
19
    /**
20
     * Indicates if loading of the provider is deferred.
21
     *
22
     * @var bool
23
     */
24
    protected $defer = false;
25
26
    /**
27
     * Container internal Service Provides.
28
     *
29
     * @var array
30
     */
31
    private $containerServiceProviders = [
32
        AuthServiceProvider::class,
33
        EventsServiceProvider::class,
34
    ];
35
36
    /**
37
     * Perform post-registration booting of services.
38
     */
39
    public function boot()
40
    {
41
        $this->registerServiceProviders($this->containerServiceProviders);
42
    }
43
44
    /**
45
     * Register bindings in the container.
46
     */
47
    public function register()
48
    {
49
        $this->app->bind(UserRepositoryInterface::class, UserRepository::class);
50
    }
51
}
52