CbsServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 2
A register() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the Laravel Cbs package.
5
 *
6
 * (c) Edward Paul <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Infinitypaul\Cbs;
13
14
use Illuminate\Support\ServiceProvider;
15
16
class CbsServiceProvider extends ServiceProvider
17
{
18
    /**
19
     * Bootstrap the application services.
20
     */
21
    public function boot()
22
    {
23
        if ($this->app->runningInConsole()) {
24
            $this->publishes([
25
                __DIR__.'/../config/cbs.php' => config_path('cbs.php'),
26
            ], 'config');
27
        }
28
    }
29
30
    /**
31
     * Register the application services.
32
     */
33
    public function register()
34
    {
35
        // Automatically apply the package configuration
36
        $this->mergeConfigFrom(__DIR__.'/../config/cbs.php', 'cbs');
37
38
        // Register the main class to use with the facade
39
        $this->app->singleton('laravel-cbs', function () {
40
            return new Cbs;
41
        });
42
    }
43
}
44