@@ -45,7 +45,7 @@ final class FeatureContext implements Context
4545 /**
4646 * @BeforeSuite
4747 */
48- public static function prepare (BeforeSuiteScope $ scope )
48+ public static function prepare (BeforeSuiteScope $ scope ): void
4949 {
5050 self ::$ tracer = new BehatHookTracer ();
5151 self ::$ tracer ->hook ($ scope );
@@ -54,15 +54,15 @@ public static function prepare(BeforeSuiteScope $scope)
5454 /**
5555 * @AfterScenario
5656 */
57- public static function reset (AfterScenarioScope $ scope )
57+ public static function reset (AfterScenarioScope $ scope ): void
5858 {
5959 self ::$ tracer ->hook ($ scope );
6060 }
6161
6262 /**
6363 * @AfterSuite
6464 */
65- public static function clean (AfterSuiteScope $ scope )
65+ public static function clean (AfterSuiteScope $ scope ): void
6666 {
6767 self ::$ tracer ->hook ($ scope );
6868 self ::$ tracer = null ;
@@ -95,7 +95,7 @@ public function __construct(string $redmineVersion, string $rootPath)
9595 /**
9696 * @Given I have a :clientName client
9797 */
98- public function iHaveAClient ($ clientName )
98+ public function iHaveAClient ($ clientName ): void
9999 {
100100 if ($ clientName !== 'NativeCurlClient ' ) {
101101 throw new InvalidArgumentException ('Client ' . $ clientName . ' is not supported. ' );
@@ -122,7 +122,7 @@ private function registerClientResponse(mixed $lastReturn, Response $lastRespons
122122 /**
123123 * @Then the response has the status code :statusCode
124124 */
125- public function theResponseHasTheStatusCode (int $ statusCode )
125+ public function theResponseHasTheStatusCode (int $ statusCode ): void
126126 {
127127 TestCase::assertSame (
128128 $ statusCode ,
@@ -134,7 +134,7 @@ public function theResponseHasTheStatusCode(int $statusCode)
134134 /**
135135 * @Then the response has the content type :contentType
136136 */
137- public function theResponseHasTheContentType (string $ contentType )
137+ public function theResponseHasTheContentType (string $ contentType ): void
138138 {
139139 TestCase::assertStringStartsWith (
140140 $ contentType ,
@@ -146,87 +146,87 @@ public function theResponseHasTheContentType(string $contentType)
146146 /**
147147 * @Then the response has an empty content type
148148 */
149- public function theResponseHasAnEmptyContentType ()
149+ public function theResponseHasAnEmptyContentType (): void
150150 {
151151 TestCase::assertSame ('' , $ this ->lastResponse ->getContentType ());
152152 }
153153
154154 /**
155155 * @Then the response has the content :content
156156 */
157- public function theResponseHasTheContent (string $ content )
157+ public function theResponseHasTheContent (string $ content ): void
158158 {
159159 TestCase::assertSame ($ content , $ this ->lastResponse ->getContent ());
160160 }
161161
162162 /**
163163 * @Then the response has the content
164164 */
165- public function theResponseHasTheContentWithMultipleLines (PyStringNode $ string )
165+ public function theResponseHasTheContentWithMultipleLines (PyStringNode $ string ): void
166166 {
167167 TestCase::assertSame ($ string ->getRaw (), $ this ->lastResponse ->getContent ());
168168 }
169169
170170 /**
171171 * @Then the returned data is true
172172 */
173- public function theReturnedDataIsTrue ()
173+ public function theReturnedDataIsTrue (): void
174174 {
175175 TestCase::assertTrue ($ this ->lastReturn );
176176 }
177177
178178 /**
179179 * @Then the returned data is false
180180 */
181- public function theReturnedDataIsFalse ()
181+ public function theReturnedDataIsFalse (): void
182182 {
183183 TestCase::assertFalse ($ this ->lastReturn );
184184 }
185185
186186 /**
187187 * @Then the returned data is exactly :content
188188 */
189- public function theReturnedDataIsExactly (string $ content )
189+ public function theReturnedDataIsExactly (string $ content ): void
190190 {
191191 TestCase::assertSame ($ content , $ this ->lastReturn );
192192 }
193193
194194 /**
195195 * @Then the returned data is exactly
196196 */
197- public function theReturnedDataIsExactlyWithMultipleLines (PyStringNode $ string )
197+ public function theReturnedDataIsExactlyWithMultipleLines (PyStringNode $ string ): void
198198 {
199199 TestCase::assertSame ($ string ->getRaw (), $ this ->lastReturn );
200200 }
201201
202202 /**
203203 * @Then the returned data is an instance of :className
204204 */
205- public function theReturnedDataIsAnInstanceOf (string $ className )
205+ public function theReturnedDataIsAnInstanceOf (string $ className ): void
206206 {
207207 TestCase::assertInstanceOf ($ className , $ this ->lastReturn );
208208 }
209209
210210 /**
211211 * @Then the returned data is an array
212212 */
213- public function theReturnedDataIsAnArray ()
213+ public function theReturnedDataIsAnArray (): void
214214 {
215215 TestCase::assertIsArray ($ this ->lastReturn );
216216 }
217217
218218 /**
219219 * @Then the returned data contains :count items
220220 */
221- public function theReturnedDataContainsItems (int $ count )
221+ public function theReturnedDataContainsItems (int $ count ): void
222222 {
223223 TestCase::assertCount ($ count , $ this ->lastReturn );
224224 }
225225
226226 /**
227227 * @Then the returned data contains the following data
228228 */
229- public function theReturnedDataContainsTheFollowingData (TableNode $ table )
229+ public function theReturnedDataContainsTheFollowingData (TableNode $ table ): void
230230 {
231231 $ returnData = $ this ->lastReturn ;
232232
@@ -240,23 +240,23 @@ public function theReturnedDataContainsTheFollowingData(TableNode $table)
240240 /**
241241 * @Then the returned data has only the following properties
242242 */
243- public function theReturnedDataHasOnlyTheFollowingProperties (PyStringNode $ string )
243+ public function theReturnedDataHasOnlyTheFollowingProperties (PyStringNode $ string ): void
244244 {
245245 $ this ->theReturnedDataPropertyHasOnlyTheFollowingProperties (null , $ string );
246246 }
247247
248248 /**
249249 * @Then the returned data has proterties with the following data
250250 */
251- public function theReturnedDataHasProtertiesWithTheFollowingData (TableNode $ table )
251+ public function theReturnedDataHasProtertiesWithTheFollowingData (TableNode $ table ): void
252252 {
253253 $ this ->theReturnedDataPropertyContainsTheFollowingData (null , $ table );
254254 }
255255
256256 /**
257257 * @Then the returned data :property property is an array
258258 */
259- public function theReturnedDataPropertyIsAnArray ($ property )
259+ public function theReturnedDataPropertyIsAnArray ($ property ): void
260260 {
261261 $ returnData = $ this ->getLastReturnAsArray ();
262262
@@ -268,7 +268,7 @@ public function theReturnedDataPropertyIsAnArray($property)
268268 /**
269269 * @Then the returned data :property property contains :count items
270270 */
271- public function theReturnedDataPropertyContainsItems ($ property , int $ count )
271+ public function theReturnedDataPropertyContainsItems ($ property , int $ count ): void
272272 {
273273 $ returnData = $ this ->getLastReturnAsArray ();
274274
@@ -281,7 +281,7 @@ public function theReturnedDataPropertyContainsItems($property, int $count)
281281 /**
282282 * @Then the returned data :property property contains the following data
283283 */
284- public function theReturnedDataPropertyContainsTheFollowingData ($ property , TableNode $ table )
284+ public function theReturnedDataPropertyContainsTheFollowingData ($ property , TableNode $ table ): void
285285 {
286286 $ returnData = $ this ->getItemFromArray ($ this ->getLastReturnAsArray (), $ property );
287287
@@ -295,7 +295,7 @@ public function theReturnedDataPropertyContainsTheFollowingData($property, Table
295295 /**
296296 * @Then the returned data :property property contains the following data with Redmine version :versionComparision
297297 */
298- public function theReturnedDataPropertyContainsTheFollowingDataWithRedmineVersion ($ property , string $ versionComparision , TableNode $ table )
298+ public function theReturnedDataPropertyContainsTheFollowingDataWithRedmineVersion ($ property , string $ versionComparision , TableNode $ table ): void
299299 {
300300 $ parts = explode (' ' , $ versionComparision );
301301
@@ -313,7 +313,7 @@ public function theReturnedDataPropertyContainsTheFollowingDataWithRedmineVersio
313313 /**
314314 * @Then the returned data :property property has only the following properties
315315 */
316- public function theReturnedDataPropertyHasOnlyTheFollowingProperties ($ property , PyStringNode $ string )
316+ public function theReturnedDataPropertyHasOnlyTheFollowingProperties ($ property , PyStringNode $ string ): void
317317 {
318318 $ value = $ this ->getItemFromArray ($ this ->getLastReturnAsArray (), $ property );
319319
@@ -325,7 +325,7 @@ public function theReturnedDataPropertyHasOnlyTheFollowingProperties($property,
325325 /**
326326 * @Then the returned data :property property has only the following properties with Redmine version :versionComparision
327327 */
328- public function theReturnedDataPropertyHasOnlyTheFollowingPropertiesWithRedmineVersion ($ property , string $ versionComparision , PyStringNode $ string )
328+ public function theReturnedDataPropertyHasOnlyTheFollowingPropertiesWithRedmineVersion ($ property , string $ versionComparision , PyStringNode $ string ): void
329329 {
330330 $ parts = explode (' ' , $ versionComparision );
331331
@@ -388,7 +388,7 @@ private function getItemFromArray(array $array, $key): mixed
388388 return $ array ;
389389 }
390390
391- private function assertTableNodeIsSameAsArray (TableNode $ table , array $ data )
391+ private function assertTableNodeIsSameAsArray (TableNode $ table , array $ data ): void
392392 {
393393 foreach ($ table as $ row ) {
394394 TestCase::assertArrayHasKey ($ row ['property ' ], $ data , 'Possible keys are: ' . implode (', ' , array_keys ($ data )));
0 commit comments