From 8d6d37a9e46d51b43c66ab7cb4171500acc7bf6c Mon Sep 17 00:00:00 2001 From: Marco Beinbrech Date: Fri, 11 Aug 2023 09:43:48 +0200 Subject: [PATCH] [php82] fix _stop function --- lib/Cake/Console/ShellDispatcher.php | 2 +- lib/Cake/Core/CakeObject.php | 1 - lib/Cake/Test/Case/Console/ShellDispatcherTest.php | 5 +---- rector.php | 1 + 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index 7fec5c914..467af300a 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -412,7 +412,7 @@ public function help() * @param int|string $status see http://php.net/exit for values * @return void */ - protected function _stop($status = 0): never + protected function _stop($status = 0): void { exit($status); } diff --git a/lib/Cake/Core/CakeObject.php b/lib/Cake/Core/CakeObject.php index 8e57616d5..2ad475f7f 100644 --- a/lib/Cake/Core/CakeObject.php +++ b/lib/Cake/Core/CakeObject.php @@ -137,7 +137,6 @@ public function dispatchMethod($method, $params = []) * testing easier. * * @param int|string $status see http://php.net/exit for values - * @return void */ protected function _stop($status = 0): never { diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index eb5edd0da..89db79062 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -64,12 +64,9 @@ public function clear() { /** * _stop method - * - * @return void */ - protected function _stop($status = 0) { + protected function _stop($status = 0): void { $this->stopped = 'Stopped with status: ' . $status; - return $status; } /** diff --git a/rector.php b/rector.php index 0e863ceae..bff4ce446 100644 --- a/rector.php +++ b/rector.php @@ -21,6 +21,7 @@ $rectorConfig->parallel(360, 8); + $rectorConfig->phpVersion(PhpVersion::PHP_80); // DEFINE RULES (Single & Sets) // Rule Overview: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md // Register a single rule