LoggerTrait::getLogger()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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