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

Config::shouldSkipFeatures()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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