Passed
Push — master ( 719ac8...9eeeb5 )
by Radu
13:14
created

AbstractLogger   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
eloc 5
c 2
b 0
f 0
dl 0
loc 24
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A debug() 0 3 1
A error() 0 3 1
A warning() 0 3 1
A info() 0 3 1
1
<?php
2
namespace WebServCo\Framework\Log;
3
4
abstract class AbstractLogger
5
{
6
    abstract public function clear();
7
8
    abstract public function log($level, $message, $context = []);
9
10
    public function debug($message, $context = [])
11
    {
12
        return $this->log(LogLevel::DEBUG, $message, $context);
13
    }
14
15
    public function error($message, $context = [])
16
    {
17
        return $this->log(LogLevel::ERROR, $message, $context);
18
    }
19
20
    public function info($message, $context = [])
21
    {
22
        return $this->log(LogLevel::INFO, $message, $context);
23
    }
24
25
    public function warning($message, $context = [])
26
    {
27
        return $this->log(LogLevel::WARNING, $message, $context);
28
    }
29
}
30