LaravelGoogleIndexingServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 2
A register() 0 8 1
1
<?php
2
3
namespace Famdirksen\LaravelGoogleIndexing\ServiceProvider;
4
5
use Illuminate\Support\ServiceProvider;
6
use Famdirksen\LaravelGoogleIndexing\LaravelGoogleIndexing;
7
8
class LaravelGoogleIndexingServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        if ($this->app->runningInConsole()) {
16
            $this->publishes([
17
                __DIR__.'/../../config/config.php' => config_path('laravel-google-indexing.php'),
18
            ], 'config');
19
        }
20
    }
21
22
    /**
23
     * Register the application services.
24
     */
25
    public function register()
26
    {
27
        $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'laravel-google-indexing');
28
29
        $this->app->bind('laravel_google_indexing', function () {
30
            return new LaravelGoogleIndexing();
31
        });
32
    }
33
}
34