getListWithoutSeparator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 *  This file is part of the Micro framework package.
7
 *
8
 *  (c) Stanislau Komar <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Micro\Framework\Kernel\Test\Unit;
15
16
use Micro\Framework\Kernel\Configuration\PluginConfiguration;
17
18
/**
19
 * @author Stanislau Komar <[email protected]>
20
 */
21
class ConfigurableTestPluginConfiguration extends PluginConfiguration
22
{
23
    public function getEnv(): string
24
    {
25
        return $this->configuration->get('APP_ENV', null, false);
26
    }
27
28
    public function getList(): array
29
    {
30
        $list = $this->configuration->get('ENV_LIST', null, false);
31
32
        return $this->explodeStringToArray($list);
33
    }
34
35
    public function getAlreadyList(): array
36
    {
37
        return $this->explodeStringToArray($this->getList());
38
    }
39
40
    public function getListWithoutSeparator(): array
41
    {
42
        return $this->explodeStringToArray($this->configuration->get('ENV_LIST', null, false), '');
43
    }
44
45
    public function getRoutingKeyConfig(): ConfigurableTestPluginRoutingConfiguration
46
    {
47
        return new ConfigurableTestPluginRoutingConfiguration($this->configuration, 'TEST');
48
    }
49
}
50