1 | <?php |
||
18 | class FeatureNode implements KeywordNodeInterface, TaggedNodeInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var null|string |
||
22 | */ |
||
23 | private $title; |
||
24 | /** |
||
25 | * @var null|string |
||
26 | */ |
||
27 | private $description; |
||
28 | /** |
||
29 | * @var string[] |
||
30 | */ |
||
31 | private $tags = array(); |
||
32 | /** |
||
33 | * @var null|BackgroundNode |
||
34 | */ |
||
35 | private $background; |
||
36 | /** |
||
37 | * @var ScenarioInterface[] |
||
38 | */ |
||
39 | private $scenarios = array(); |
||
40 | /** |
||
41 | * @var RuleNode[] |
||
42 | */ |
||
43 | private $rules = array(); |
||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | private $keyword; |
||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $language; |
||
52 | /** |
||
53 | * @var null|string |
||
54 | */ |
||
55 | private $file; |
||
56 | /** |
||
57 | * @var integer |
||
58 | */ |
||
59 | private $line; |
||
60 | |||
61 | /** |
||
62 | * Initializes feature. |
||
63 | * |
||
64 | * @param null|string $title |
||
65 | * @param null|string $description |
||
66 | * @param string[] $tags |
||
67 | * @param null|BackgroundNode $background |
||
68 | * @param ScenarioInterface[] $scenarios |
||
69 | * @param string $keyword |
||
70 | * @param string $language |
||
71 | * @param null|string $file |
||
72 | * @param integer $line |
||
73 | * @param RuleNode[] $rules |
||
74 | */ |
||
75 | 270 | public function __construct( |
|
98 | |||
99 | /** |
||
100 | * Returns node type string |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | 1 | public function getNodeType() |
|
105 | { |
||
106 | 1 | return 'Feature'; |
|
107 | } |
||
108 | |||
109 | /** |
||
110 | * Returns feature title. |
||
111 | * |
||
112 | * @return null|string |
||
113 | */ |
||
114 | 47 | public function getTitle() |
|
118 | |||
119 | /** |
||
120 | * Checks if feature has a description. |
||
121 | * |
||
122 | * @return Boolean |
||
123 | */ |
||
124 | public function hasDescription() |
||
128 | |||
129 | /** |
||
130 | * Returns feature description. |
||
131 | * |
||
132 | * @return null|string |
||
133 | */ |
||
134 | 46 | public function getDescription() |
|
138 | |||
139 | /** |
||
140 | * Checks if feature is tagged with tag. |
||
141 | * |
||
142 | * @param string $tag |
||
143 | * |
||
144 | * @return Boolean |
||
145 | */ |
||
146 | public function hasTag($tag) |
||
150 | |||
151 | /** |
||
152 | * Checks if feature has tags. |
||
153 | * |
||
154 | * @return Boolean |
||
155 | */ |
||
156 | 2 | public function hasTags() |
|
160 | |||
161 | /** |
||
162 | * Returns feature tags. |
||
163 | * |
||
164 | * @return string[] |
||
165 | */ |
||
166 | 44 | public function getTags() |
|
170 | |||
171 | /** |
||
172 | * Checks if feature has background. |
||
173 | * |
||
174 | * @return Boolean |
||
175 | */ |
||
176 | 1 | public function hasBackground() |
|
180 | |||
181 | /** |
||
182 | * Returns feature background. |
||
183 | * |
||
184 | * @return null|BackgroundNode |
||
185 | */ |
||
186 | 44 | public function getBackground() |
|
190 | |||
191 | /** |
||
192 | * Checks if feature has scenarios. |
||
193 | * |
||
194 | * @return Boolean |
||
195 | */ |
||
196 | 2 | public function hasScenarios() |
|
200 | |||
201 | /** |
||
202 | * Returns feature scenarios. |
||
203 | * |
||
204 | * @return ScenarioInterface[] |
||
205 | */ |
||
206 | 47 | public function getScenarios() |
|
210 | |||
211 | /** |
||
212 | * Returns rules |
||
213 | * |
||
214 | * @return RuleNode[] |
||
215 | */ |
||
216 | 36 | public function getRules() |
|
220 | |||
221 | /** |
||
222 | * Returns feature keyword. |
||
223 | * |
||
224 | * @return string |
||
225 | */ |
||
226 | 41 | public function getKeyword() |
|
230 | |||
231 | /** |
||
232 | * Returns feature language. |
||
233 | * |
||
234 | * @return string |
||
235 | */ |
||
236 | 43 | public function getLanguage() |
|
240 | |||
241 | /** |
||
242 | * Returns feature file. |
||
243 | * |
||
244 | * @return null|string |
||
245 | */ |
||
246 | 13 | public function getFile() |
|
250 | |||
251 | /** |
||
252 | * Returns feature declaration line number. |
||
253 | * |
||
254 | * @return integer |
||
255 | */ |
||
256 | 50 | public function getLine() |
|
260 | } |
||
261 |
If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway: