Completed
Push — master ( 9668b6...a78a36 )
by Mike
04:14
created

DataProviderConfig::getFilePattern()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\DataProvider;
6
7
8
use Xervice\Core\Config\AbstractConfig;
9
10
class DataProviderConfig extends AbstractConfig
11
{
12
    public const DATA_PROVIDER_PATHS = 'data.provider.paths';
13
14
    public const DATA_PROVIDER_GENERATED_PATH = 'data.provider.generated.path';
15
16
    public const DATA_PROVIDER_NAMESPACE = 'data.provider.namespace';
17
18
    public const FILE_PATTERN = 'file.pattern';
19
20
    /**
21
     * @return array
22
     */
23 3
    public function getPaths(): array
24
    {
25 3
        return $this->get(self::DATA_PROVIDER_PATHS, []);
26
    }
27
28
    /**
29
     * @return string
30
     */
31 3
    public function getGeneratedPath(): string
32
    {
33 3
        return $this->get(self::DATA_PROVIDER_GENERATED_PATH);
34
    }
35
36
    /**
37
     * @return string
38
     */
39 3
    public function getDataProviderNamespace(): string
40
    {
41 3
        return $this->get(self::DATA_PROVIDER_NAMESPACE, 'DataProvider');
42
    }
43
44
    /**
45
     * @return string
46
     */
47 3
    public function getFilePattern(): string
48
    {
49 3
        return $this->get(self::FILE_PATTERN, '*.dataprovider.xml');
50
    }
51
}