Completed
Push — master ( c4e3cd...c5cae6 )
by Anton
05:38
created

DebuggerConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasHandlers() 0 4 1
A logHandlers() 0 4 1
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
namespace Spiral\Debug\Configs;
9
10
use Spiral\Core\InjectableConfig;
11
12
/**
13
 * Debug component configuration. Must only contain array of log handlers for monolog channels.
14
 */
15
class DebuggerConfig extends InjectableConfig
16
{
17
    /**
18
     * Configuration section.
19
     */
20
    const CONFIG = 'monolog';
21
22
    /**
23
     * @var array
24
     */
25
    protected $config = [];
26
27
    /**
28
     * @param string $channel
29
     * @return array
30
     */
31
    public function hasHandlers($channel)
32
    {
33
        return isset($this->config[$channel]);
34
    }
35
36
    /**
37
     * @param string $channel
38
     * @return array
39
     */
40
    public function logHandlers($channel)
41
    {
42
        return $this->config[$channel];
43
    }
44
}