Passed
Branch 2.0.0 (c5bb78)
by Chubarov
09:06
created

LoggerServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
namespace agoalofalife\bpm\ServiceProviders;
3
4
use agoalofalife\bpm\Contracts\ServiceProvider;
5
use agoalofalife\bpm\KernelBpm;
6
use Monolog\Handler\StreamHandler;
7
use Monolog\Logger;
8
9
10
class LoggerServiceProvider implements ServiceProvider
11
{
12
13
    public function register()
14
    {
15 16
        app()->bind(Logger::class, function(){
16
            $log = new Logger(KernelBpm::class);
17
           return  $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG, Logger::DEBUG));
18 16
        });
19
    }
20
}