8000 Add type hints · symfony/symfony@2403702 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2403702

Browse files
committed
Add type hints
This makes those classes compatible with phpunit 7. Fixes #26931
1 parent 6d9d329 commit 2403702

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Symfony/Bridge/PhpUnit/TextUI/Command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\PhpUnit\TextUI;
1313

1414
use PHPUnit\TextUI\Command as BaseCommand;
15+
use PHPUnit\TextUI\TestRunner as BaseRunner;
1516

1617
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
1718
class_alias('Symfony\Bridge\PhpUnit\Legacy\Command', 'Symfony\Bridge\PhpUnit\TextUI\Command');
@@ -26,7 +27,7 @@ class Command extends BaseCommand
2627
/**
2728
* {@inheritdoc}
2829
*/
29-
protected function createRunner()
30+
protected function createRunner(): BaseRunner
3031
{
3132
return new TestRunner($this->arguments['loader']);
3233
}

src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class TestRunner extends BaseRunner
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
protected function handleConfiguration(array &$arguments)
30+
protected function handleConfiguration(array &$arguments): void
3131
{
3232
$listener = new SymfonyTestsListener();
3333

34-
$result = parent::handleConfiguration($arguments);
34+
parent::handleConfiguration($arguments);
3535

3636
$arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
3737

@@ -48,8 +48,6 @@ protected function handleConfiguration(array &$arguments)
4848
if (!$registeredLocally) {
4949
$arguments['listeners'][] = $listener;
5050
}
51-
52-
return $result;
5351
}
5452
}
5553
}

0 commit comments

Comments
 (0)
0