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

DebuggerConfig::hasHandlers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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