Passed
Push — master ( 3376db...1497f5 )
by Mike
12:25
created

DynamicModulesConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 33
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommandProviderFilter() 0 4 1
A getApplicationPath() 0 4 1
A getNamespaces() 0 6 1
1
<?php
2
3
4
namespace Nexus\DynamicModules;
5
6
7
use Xervice\Config\XerviceConfig;
8
use Xervice\Core\Config\AbstractConfig;
9
use Xervice\Core\CoreConfig;
10
11
class DynamicModulesConfig extends AbstractConfig
12
{
13
    const COMMAND_PROVIDER_FILTER = 'command.provider.filter';
14
15
    /**
16
     * @return string
17
     * @throws \Xervice\Config\Exception\ConfigNotFound
18
     */
19
    public function getCommandProviderFilter()
20
    {
21
        return $this->get(self::COMMAND_PROVIDER_FILTER, '*CommandProvider.php');
22
    }
23
24
    /**
25
     * @return string
26
     * @throws \Xervice\Config\Exception\ConfigNotFound
27
     */
28
    public function getApplicationPath()
29
    {
30
        return $this->get(XerviceConfig::APPLICATION_PATH);
31
    }
32
33
    /**
34
     * @return array
35
     * @throws \Xervice\Config\Exception\ConfigNotFound
36
     */
37
    public function getNamespaces() : array
38
    {
39
        return [
40
            $this->get(CoreConfig::PROJECT_LAYER_NAMESPACE)
41
        ] + $this->get(CoreConfig::ADDITIONAL_LAYER_NAMESPACES, []);
42
    }
43
}