1111namespace SebastianBergmann \CodeCoverage ;
1212
1313use SebastianBergmann \CodeCoverage \Driver \Driver ;
14+ use SebastianBergmann \CodeCoverage \Report \Xml \Coverage ;
1415
1516abstract class TestCase extends \PHPUnit \Framework \TestCase
1617{
1718 protected static $ TEST_TMP_PATH ;
1819
19- public static function setUpBeforeClass ()
20+ public static function setUpBeforeClass (): void
2021 {
2122 self ::$ TEST_TMP_PATH = TEST_FILES_PATH . 'tmp ' ;
2223 }
@@ -73,7 +74,7 @@ protected function getXdebugDataForBankAccount()
7374 ];
7475 }
7576
76- protected function getCoverageForBankAccount ()
77+ protected function getCoverageForBankAccount (): CodeCoverage
7778 {
7879 $ data = $ this ->getXdebugDataForBankAccount ();
7980
@@ -139,7 +140,7 @@ protected function getCoverageForBankAccount()
139140 return $ coverage ;
140141 }
141142
142- protected function getCoverageForBankAccountForFirstTwoTests ()
143+ protected function getCoverageForBankAccountForFirstTwoTests (): CodeCoverage
143144 {
144145 $ data = $ this ->getXdebugDataForBankAccount ();
145146
@@ -224,7 +225,7 @@ protected function getCoverageForBankAccountForLastTwoTests()
224225 return $ coverage ;
225226 }
226227
227- protected function getExpectedDataArrayForBankAccount ()
228+ protected function getExpectedDataArrayForBankAccount (): array
228229 {
229230 return [
230231 TEST_FILES_PATH . 'BankAccount.php ' => [
@@ -258,7 +259,7 @@ protected function getExpectedDataArrayForBankAccount()
258259 ];
259260 }
260261
261- protected function getExpectedDataArrayForBankAccountInReverseOrder ()
262+ protected function getExpectedDataArrayForBankAccountInReverseOrder (): array
262263 {
263264 return [
264265 TEST_FILES_PATH . 'BankAccount.php ' => [
@@ -292,7 +293,7 @@ protected function getExpectedDataArrayForBankAccountInReverseOrder()
292293 ];
293294 }
294295
295- protected function getCoverageForFileWithIgnoredLines ()
296+ protected function getCoverageForFileWithIgnoredLines (): CodeCoverage
296297 {
297298 $ filter = new Filter ;
298299 $ filter ->addFileToWhitelist (TEST_FILES_PATH . 'source_with_ignore.php ' );
@@ -308,7 +309,7 @@ protected function getCoverageForFileWithIgnoredLines()
308309 return $ coverage ;
309310 }
310311
311- protected function setUpXdebugStubForFileWithIgnoredLines ()
312+ protected function setUpXdebugStubForFileWithIgnoredLines (): Driver
312313 {
313314 $ stub = $ this ->createMock (Driver::class);
314315
@@ -328,7 +329,7 @@ protected function setUpXdebugStubForFileWithIgnoredLines()
328329 return $ stub ;
329330 }
330331
331- protected function getCoverageForClassWithAnonymousFunction ()
332+ protected function getCoverageForClassWithAnonymousFunction (): CodeCoverage
332333 {
333334 $ filter = new Filter ;
334335 $ filter ->addFileToWhitelist (TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php ' );
@@ -344,7 +345,7 @@ protected function getCoverageForClassWithAnonymousFunction()
344345 return $ coverage ;
345346 }
346347
347- protected function setUpXdebugStubForClassWithAnonymousFunction ()
348+ protected function setUpXdebugStubForClassWithAnonymousFunction (): Driver
348349 {
349350 $ stub = $ this ->createMock (Driver::class);
350351
@@ -369,7 +370,7 @@ protected function setUpXdebugStubForClassWithAnonymousFunction()
369370 return $ stub ;
370371 }
371372
372- protected function getCoverageForCrashParsing ()
373+ protected function getCoverageForCrashParsing (): CodeCoverage
373374 {
374375 $ filter = new Filter ;
375376 $ filter ->addFileToWhitelist (TEST_FILES_PATH . 'Crash.php ' );
@@ -381,7 +382,7 @@ protected function getCoverageForCrashParsing()
381382 );
382383 }
383384
384- protected function setUpXdebugStubForCrashParsing ()
385+ protected function setUpXdebugStubForCrashParsing (): Driver
385386 {
386387 $ stub = $ this ->createMock (Driver::class);
387388
0 commit comments