diff --git a/composer.json b/composer.json index d16cb24..83d2750 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,13 @@ ], "license": "MIT", "require": { + "php": "^7.1" + }, + "conflict": { + "phpunit/phpunit": "<7.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "bin": ["bin/phpunit-randomizer"], "autoload": { diff --git a/src/PHPUnitRandomizer/Command.php b/src/PHPUnitRandomizer/Command.php index a28393e..db46f19 100644 --- a/src/PHPUnitRandomizer/Command.php +++ b/src/PHPUnitRandomizer/Command.php @@ -8,11 +8,6 @@ public function __construct() $this->longOptions['order='] = 'orderHandler'; } - public static function main($exit = TRUE) - { - return parent::main($exit); - } - /** * Only called when 'order' argument is used. * @@ -51,12 +46,12 @@ private function getRandomSeed() return rand(0, 9999); } - protected function createRunner() + protected function createRunner(): \PHPUnit\TextUI\TestRunner { return new TestRunner($this->arguments['loader']); } - public function showHelp() + public function showHelp(): void { parent::showHelp(); diff --git a/src/PHPUnitRandomizer/ResultPrinter.php b/src/PHPUnitRandomizer/ResultPrinter.php index c591e41..c33e54f 100644 --- a/src/PHPUnitRandomizer/ResultPrinter.php +++ b/src/PHPUnitRandomizer/ResultPrinter.php @@ -32,7 +32,7 @@ public function __construct($out = null, $verbose = false, $colors = false, $deb * * @param PHPUnit\Framework\TestResult $result */ - protected function printFooter(\PHPUnit\Framework\TestResult $result) + protected function printFooter(\PHPUnit\Framework\TestResult $result): void { parent::printFooter($result); diff --git a/src/PHPUnitRandomizer/TestRunner.php b/src/PHPUnitRandomizer/TestRunner.php index c872c06..2dcf7be 100644 --- a/src/PHPUnitRandomizer/TestRunner.php +++ b/src/PHPUnitRandomizer/TestRunner.php @@ -10,7 +10,7 @@ class TestRunner extends \PHPUnit\TextUI\TestRunner * @param PHPUnit\Framework\Test $suite TestSuite to execute * @param array $arguments Arguments to use */ - public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), $exit = true) + public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), bool $exit = true): \PHPUnit\Framework\TestResult { $localArguments = $arguments;