1 | <?php |
||
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 string[] |
||
18 | */ |
||
19 | private $skipTags = []; |
||
20 | |||
21 | /** |
||
22 | * @param array $config |
||
23 | */ |
||
24 | public function __construct($config) |
||
30 | |||
31 | /** |
||
32 | * @return bool |
||
33 | */ |
||
34 | public function shouldSkipScenarios() |
||
38 | |||
39 | /** |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function shouldSkipFeatures() |
||
46 | |||
47 | /** |
||
48 | * @return string[] |
||
49 | */ |
||
50 | public function getSkipTags() |
||
54 | } |
||
55 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: