Passed
Push — master ( fc83aa...c68055 )
by Radu
01:36
created

CliOutputLogger   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 13
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A log() 0 5 2
A clear() 0 3 1
1
<?php
2
namespace WebServCo\Framework\Log;
3
4
final class CliOutputLogger extends AbstractOutputLogger implements
5
    \WebServCo\Framework\Interfaces\OutputLoggerInterface
6
{
7
    public function clear()
8
    {
9
        $this->output(\WebServCo\Framework\Cli\Ansi::clear(), true);
10
    }
11
12
    public function log($level, $message, $context = [])
13
    {
14
        $this->output($message, true);
15
        if (!empty($context)) {
16
            $this->output(var_export($context, true), true);
17
        }
18
    }
19
}
20