ServiceConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 22
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStaticApiToken() 0 3 1
A isDebug() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service;
6
7
8
use Xervice\Core\Config\AbstractConfig;
9
10
class ServiceConfig extends AbstractConfig
11
{
12
    const STATIC_API_TOKEN_LIST = 'static.api.token.list';
13
14
    const DEBUG_ACTIVE = 'debug.active';
15
16
    /**
17
     * @return array
18
     * @throws \Xervice\Config\Exception\ConfigNotFound
19
     */
20
    public function getStaticApiToken() : array
21
    {
22
        return $this->get(self::STATIC_API_TOKEN_LIST, []);
23
    }
24
25
    /**
26
     * @return bool
27
     * @throws \Xervice\Config\Exception\ConfigNotFound
28
     */
29 1
    public function isDebug() : bool
30
    {
31 1
        return $this->get(self::DEBUG_ACTIVE, false);
32
    }
33
}