Test Failed
Push — master ( 3868e7...2b7b48 )
by Robin
05:45
created

RequestLoggerServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 6 1
1
<?php
2
namespace RobinDirksen1\LaravelRequestLogger;
3
4
use Illuminate\Support\ServiceProvider;
5
6
class RequestLoggerServiceProvider extends ServiceProvider
7
{
8
    /**
9
     * Bootstrap the application services.
10
     *
11
     * @return void
12
     */
13
    public function boot()
14
    {
15
16
    }
17
18
19
    /**
20
     * Register the application services.
21
     *
22
     * @return void
23
     */
24
    public function register()
25
    {
26
        $this->app->singleton(RequestLogger::class, function () {
27
            return new RequestLogger();
28
        });
29
        $this->app->alias(RequestLogger::class, 'request-logger');
30
    }
31
}