LoggerServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
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 23
        app()->bind(Logger::class, function(){
16 1
            $log = new Logger(KernelBpm::class);
17 1
           return  $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG . date('Y-m-d'). '.txt', Logger::DEBUG));
18 23
        });
19
    }
20
}