Config   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMagentoBootstrapPath() 0 4 1
A getRequiredMagentoConfig() 0 4 1
1
<?php
2
3
namespace Bex\Behat\Magento2InitExtension\ServiceContainer;
4
5
class Config
6
{
7
    const CONFIG_KEY_MAGENTO_BOOTSTRAP_PATH = 'magento_bootstrap_path';
8
    const CONFIG_KEY_MAGENTO_CONFIGS = 'magento_configs';
9
10
    /**
11
     * @var string
12
     */
13
    private $magentoBootstrapPath;
14
15
    /**
16
     * @var array
17
     */
18
    private $magentoConfigs;
19
20
    /**
21
     * @param array $config
22
     */
23
    public function __construct(array $config)
24
    {
25
        $this->magentoBootstrapPath = $config[self::CONFIG_KEY_MAGENTO_BOOTSTRAP_PATH];
26
        $this->magentoConfigs = $config[self::CONFIG_KEY_MAGENTO_CONFIGS];
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getMagentoBootstrapPath()
33
    {
34
        return $this->magentoBootstrapPath;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getRequiredMagentoConfig()
41
    {
42
        return $this->magentoConfigs;
43
    }
44
}
45