Config   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 0
dl 0
loc 51
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A enableAll() 0 6 1
A enableSuiteSelector() 0 4 1
A enableFeatureSelector() 0 4 1
A enableScenarioSelector() 0 4 1
A isSuiteSelectorEnabled() 0 4 1
A isFeatureSelectorEnabled() 0 4 1
A isScenarioSelectorEnabled() 0 4 1
1
<?php
2
3
namespace Bex\Behat\ChooseTestsExtension\ServiceContainer;
4
5
class Config
6
{
7
    private $suiteSelectorEnabled = false;
8
    private $featureSelectorEnabled = false;
9
    private $scenarioSelectorEnabled = false;
10
    
11
    /**
12
     * @param array $config
13
     */
14
    public function __construct($config)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
15
    {
16
        // ...
17
    }
18
19
    public function enableAll()
20
    {
21
        $this->enableSuiteSelector();
22
        $this->enableFeatureSelector();
23
        $this->enableScenarioSelector();
24
    }
25
26
    public function enableSuiteSelector()
27
    {
28
        $this->suiteSelectorEnabled = true;
29
    }
30
31
    public function enableFeatureSelector()
32
    {
33
        $this->featureSelectorEnabled = true;
34
    }
35
36
    public function enableScenarioSelector()
37
    {
38
        $this->scenarioSelectorEnabled = true;
39
    }
40
41
    public function isSuiteSelectorEnabled()
42
    {
43
        return $this->suiteSelectorEnabled;
44
    }
45
46
    public function isFeatureSelectorEnabled()
47
    {
48
        return $this->featureSelectorEnabled;
49
    }
50
51
    public function isScenarioSelectorEnabled()
52
    {
53
        return $this->scenarioSelectorEnabled;
54
    }
55
}
56