LoggerTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setLogger() 0 4 1
A getLogger() 0 4 1
1
<?php
2
3
/*
4
 *  @author Serkin Akexander <[email protected]>
5
 */
6
7
namespace Volan\Traits;
8
9
use Psr\Log\LoggerInterface;
10
use Volan\InMemoryLogger;
11
12
trait LoggerTrait
13
{
14
15
16
    /**
17
     * @var \Psr\Log\LoggerInterface
18
     */
19
    private $logger;
20
21
22
    public function setLogger(LoggerInterface $logger)
23
    {
24
        $this->logger = $logger;
25
    }
26
27
28
29
    /**
30
     * Gets current logger
31
     *
32
     * @return InMemoryLogger
33
     */
34
    private function getLogger()
35
    {
36
        return $this->logger;
37
    }
38
}
39