ConfigurationFile::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace Yoanm\ComposerConfigManager\Domain\Model;
3
4
class ConfigurationFile
5
{
6
    const KEY_NAME = 'name';
7
    const KEY_TYPE = 'type';
8
    const KEY_LICENSE = 'license';
9
    const KEY_VERSION = 'version';
10
    const KEY_DESCRIPTION = 'description';
11
    const KEY_KEYWORDS = 'keywords';
12
    const KEY_AUTHORS = 'authors';
13
    const KEY_PROVIDE = 'provide';
14
    const KEY_SUGGEST = 'suggest';
15
    const KEY_SUPPORT = 'support';
16
    const KEY_REQUIRE = 'require';
17
    const KEY_REQUIRE_DEV = 'require-dev';
18
    const KEY_AUTOLOAD = 'autoload';
19
    const KEY_AUTOLOAD_DEV = 'autoload-dev';
20
    const KEY_SCRIPTS = 'scripts';
21
22
    /** @var Configuration */
23
    private $configuration;
24
    /** @var string[] */
25
    private $keyList = [];
26
27
    /**
28
     * @param Configuration $configuration
29
     * @param string[]      $keyList
30
     */
31
    public function __construct(Configuration $configuration, array $keyList)
32
    {
33
        $this->configuration = $configuration;
34
        $this->keyList = $keyList;
35
    }
36
37
    /**
38
     * @return Configuration
39
     */
40
    public function getConfiguration()
41
    {
42
        return $this->configuration;
43
    }
44
45
    /**
46
     * @return \string[]
47
     */
48
    public function getKeyList()
49
    {
50
        return $this->keyList;
51
    }
52
}
53