LoggerNameAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
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 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLoggerName() 0 4 1
A setLoggerName() 0 6 1
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/zf-log
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\ZfLog\Options;
7
8
/**
9
 * Class LoggerNameAwareTrait
10
 *
11
 * @package Nnx\ZfLog\Options
12
 */
13
trait LoggerNameAwareTrait
14
{
15
    /**
16
     * Имя используемого логгера
17
     *
18
     * @var string
19
     */
20
    private $loggerName;
21
22
    /**
23
     * Возвращает имя используемого логера
24
     *
25
     * @return string
26
     */
27
    public function getLoggerName()
28
    {
29
        return $this->loggerName;
30
    }
31
32
    /**
33
     * Устанавливает имя используемого логера
34
     *
35
     * @param string $loggerName
36
     *
37
     * @return $this
38
     */
39
    public function setLoggerName($loggerName)
40
    {
41
        $this->loggerName = (string)$loggerName;
42
43
        return $this;
44
    }
45
}
46