HttpLoggerServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 11 2
A register() 0 4 1
1
<?php
2
3
namespace Spatie\HttpLogger;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class HttpLoggerServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        if ($this->app->runningInConsole()) {
12
            $this->publishes([
13
                __DIR__.'/../config/http-logger.php' => config_path('http-logger.php'),
14
            ], 'config');
15
        }
16
17
        $this->app->singleton(LogProfile::class, config('http-logger.log_profile'));
18
        $this->app->singleton(LogWriter::class, config('http-logger.log_writer'));
19
    }
20
21
    public function register()
22
    {
23
        $this->mergeConfigFrom(__DIR__.'/../config/http-logger.php', 'http-logger');
24
    }
25
}
26