Logger   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

9 Methods

Rating   Name   Duplication   Size   Complexity  
A emergency() 0 4 1
A alert() 0 4 1
A critical() 0 4 1
A error() 0 4 1
A warning() 0 4 1
A notice() 0 4 1
A info() 0 4 1
A debug() 0 4 1
A log() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: lenon
5
 * Date: 20/10/16
6
 * Time: 23:51
7
 */
8
9
namespace Aszone\Vulnerabilities\Log;
10
11
use Psr\Log\LoggerInterface;
12
13
class Logger implements LoggerInterface
14
{
15
16
    public function emergency($message, array $context = array())
17
    {
18
        $this->log("EMERGENCY", $message, $context);
19
    }
20
21
    public function alert($message, array $context = array())
22
    {
23
        $this->log("ALERT", $message, $context);
24
    }
25
26
    public function critical($message, array $context = array())
27
    {
28
        $this->log("CRITICAL", $message, $context);
29
    }
30
31
    public function error($message, array $context = array())
32
    {
33
        $this->log("ERROR", $message, $context);
34
    }
35
36
    public function warning($message, array $context = array())
37
    {
38
        $this->log("WARNING", $message, $context);
39
    }
40
41
    public function notice($message, array $context = array())
42
    {
43
        $this->log("NOTICE", $message, $context);
44
    }
45
46
    public function info($message, array $context = array())
47
    {
48
        $this->log("INFO", $message, $context);
49
    }
50
51
    public function debug($message, array $context = array())
52
    {
53
        $this->log("DEBUG", $message, $context);
54
    }
55
56
    public function log($level, $message, array $context = array())
57
    {
58
        echo $level . ": " . $message;
59
    }
60
}