Logger   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 37.5%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 25
ccs 3
cts 8
cp 0.375
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setLogger() 0 4 1
A debug() 0 6 2
1
<?php
2
3
namespace Bpost\BpostApiClient;
4
5
6
use Psr\Log\LoggerInterface;
7
8
/**
9
 * Class Logger
10
 * @package Bpost\BpostApiClient
11
 */
12
class Logger
13
{
14
    /** @var  LoggerInterface */
15
    private $logger;
16
17
    /**
18
     * @param LoggerInterface $logger
19
     */
20
    public function setLogger(LoggerInterface $logger)
21
    {
22
        $this->logger = $logger;
23
    }
24
25
    /**
26
     * @param       $message
27
     * @param array $context
28
     */
29 2
    public function debug($message, array $context = array())
30
    {
31 2
        if ($this->logger) {
32
            $this->logger->debug($message, $context);
33
        }
34 2
    }
35
36
}
37