ConsoleLogger   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 10 1
1
<?php
2
3
namespace Ingenerator\RunSingle;
4
5
class ConsoleLogger extends \Psr\Log\AbstractLogger
6
{
7
    const DATE_FORMAT_INTL = 'Y-m-d\TH:i:se';
8
9
     /**
10
     * Logs with an arbitrary level.
11
     *
12
     * @param mixed $level
13
     * @param string $message
14
     * @param array $context
15
     * @return null
16
     */
17
    public function log($level, $message, array $context = array())
18
    {
19
        $time = new \DateTime;
20
        echo \sprintf(
21
            '%s: [%s] %s'.\PHP_EOL,
22
            $time->format('c'),
23
            $level,
24
            $message
25
        );
26
    }
27
28
}
29