LogFormatter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A formatBatch() 0 3 1
A format() 0 3 1
1
<?php
2
3
namespace LeKoala\DebugBar\Messages;
4
5
use Monolog\Formatter\FormatterInterface;
6
use Monolog\LogRecord;
7
8
/**
9
 * Formats incoming log messages for display in the debug bar
10
 */
11
class LogFormatter implements FormatterInterface
12
{
13
    public function format(array|LogRecord $record)
14
    {
15
        return $record['message'];
16
    }
17
18
    public function formatBatch(array $records)
19
    {
20
        return implode("\n", array_map([$this, 'format'], $records));
21
    }
22
}
23