Completed
Push — master ( 173114...f6ec07 )
by Klaus
10:42
created

JsonFormatter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Linio\Tortilla\Log\Formatter;
6
7
use Monolog\Formatter\JsonFormatter as BaseJsonFormatter;
8
9
class JsonFormatter extends BaseJsonFormatter
10
{
11
    public function format(array $record)
12
    {
13
        if (isset($record['datetime'])) {
14
            $record['time'] = substr($record['datetime']->format('U.u'), 0, -3);
15
        }
16
17
        return parent::format($record);
18
    }
19
}
20