ConfigServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 37
ccs 13
cts 13
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B register() 0 25 2
1
<?php namespace App\Providers;
2
3
use Illuminate\Support\ServiceProvider;
4
5
class ConfigServiceProvider extends ServiceProvider
6
{
7
    /**
8
     * Overwrite any vendor / package configuration.
9
     *
10
     * This service provider is intended to provide a convenient location for you
11
     * to overwrite any "vendor" or package configuration that you may want to
12
     * modify before the application handles the incoming request / command.
13
     *
14
     * @return void
15
     */
16 19
    public function register()
17
    {
18
        # Adding Hipchat and Gitter handlers to Monolog logger for non-production environments.
19 19
        if (!app()->environment('production')) {
20
            /*
21
            |--------------------------
22
            | Hipchat integration
23
            |--------------------------
24
            */
25 19
            $hipchatConfig = app('config')->get('services.hipchat');
26 19
            $hipchatHandler = new \Monolog\Handler\HipChatHandler(
27 19
                $hipchatConfig['token'],
28 19
                $hipchatConfig['room'],
29 19
                $hipchatConfig['name'],
30 19
                false,
31 19
                $hipchatConfig['level']
32
            );
33
//            $bufferHandlerForHipchat = new \Monolog\Handler\BufferHandler($hipchatHandler);
34 19
            app('log')->getMonolog()->pushHandler($hipchatHandler);
35
        }
36
37 19
        config([
38
            //
39 19
        ]);
40 19
    }
41
}
42