StrongholdServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 13 1
A register() 0 5 1
1
<?php
2
3
namespace ArgentCrusade\Stronghold\Providers;
4
5
use ArgentCrusade\Stronghold\Contracts\OneTimeTokensRepositoryInterface;
6
use ArgentCrusade\Stronghold\OneTimeTokensRepository;
7
use Illuminate\Support\ServiceProvider;
8
9
class StrongholdServiceProvider extends ServiceProvider
10
{
11
    public function boot()
12
    {
13
        $this->loadMigrationsFrom(
14
            realpath(__DIR__.'/../../database/migrations')
15
        );
16
17
        $configPath = realpath(__DIR__.'/../../config/stronghold.php');
18
19
        $this->publishes([
20
            $configPath => config_path('stronghold.php')
21
        ], 'config');
22
23
        $this->mergeConfigFrom($configPath, 'stronghold');
24
    }
25
26
    public function register()
27
    {
28
        $this->app->bind(
29
            OneTimeTokensRepositoryInterface::class,
30
            config('stronghold.tokens_repository', OneTimeTokensRepository::class)
31
        );
32
    }
33
}
34