Completed
Push — master ( c132c8...42afef )
by Dmitry
06:08
created

Logger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 1
cbo 0
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A log() 0 4 1
1
<?php
2
3
namespace Basis;
4
5
use Fluent\Logger\FluentLogger;
6
7
class Logger
8
{
9
    private $logger;
10
    private $tag;
11
12 1
    function __construct(FluentLogger $logger, $tag)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
13
    {
14 1
        $this->logger = $logger;
15 1
        $this->tag = $tag;
16 1
    }
17
18 1
    function log(array $data)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
19
    {
20 1
        return $this->logger->post($this->tag, $data);
21
    }
22
}