Passed
Push — master ( 0157df...dae217 )
by Tibor
02:07
created

Config   A

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
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 40
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A shouldSkipScenarios() 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_TAGS = 'skip_tags';
9
10
    /**
11
     * @var bool
12
     */
13
    private $skipScenarios;
14
15
    /**
16
     * @var string[]
17
     */
18
    private $skipTags = [];
19
20
    /**
21
     * @param array $config
22
     */
23
    public function __construct($config)
24
    {
25
        $this->skipScenarios = $config[self::CONFIG_PARAM_SKIP_SCENARIOS];
26
        $this->skipTags = $config[self::CONFIG_PARAM_SKIP_TAGS];
27
    }
28
29
    /**
30
     * @return bool
31
     */
32
    public function shouldSkipScenarios()
33
    {
34
        return $this->skipScenarios;
35
    }
36
37
    /**
38
     * @return string[]
39
     */
40
    public function getSkipTags()
41
    {
42
        return $this->skipTags;
43
    }
44
}
45