Passed
Push — master ( 9bb251...218ee4 )
by Tibor
01:53
created

Config   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 55
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A shouldSkipScenarios() 0 4 1
A shouldSkipFeatures() 0 4 1
A getSkipTags() 0 4 1
1
<?php
2
3
namespace Bex\Behat\SkipTestsExtension\ServiceContainer;
4
5
class Config
6
{
7
    const CONFIG_PARAM_SKIP_SCENARIOS = 'skip_scenarios';
8
    const CONFIG_PARAM_SKIP_FEATURES = 'skip_features';
9
    const CONFIG_PARAM_SKIP_TAGS = 'skip_tags';
10
11
    /**
12
     * @var bool
13
     */
14
    private $skipScenarios;
15
16
    /**
17
     * @var bool
18
     */
19
    private $skipFeatures;
20
21
    /**
22
     * @var string[]
23
     */
24
    private $skipTags = [];
25
26
    /**
27
     * @param array $config
28
     */
29
    public function __construct($config)
30
    {
31
        $this->skipScenarios = $config[self::CONFIG_PARAM_SKIP_SCENARIOS];
32
        $this->skipFeatures = $config[self::CONFIG_PARAM_SKIP_FEATURES];
33
        $this->skipTags = $config[self::CONFIG_PARAM_SKIP_TAGS];
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function shouldSkipScenarios()
40
    {
41
        return $this->skipScenarios;
42
    }
43
44
    /**
45
     * @return bool
46
     */
47
    public function shouldSkipFeatures()
48
    {
49
        return $this->skipFeatures;
50
    }
51
52
    /**
53
     * @return string[]
54
     */
55
    public function getSkipTags()
56
    {
57
        return $this->skipTags;
58
    }
59
}
60