From a8e00b899d9838dca8ae2fdddf0042334de06fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E9=8A=98=E5=87=B1?= Date: Wed, 9 Aug 2023 19:41:55 +0900 Subject: [PATCH] Revert "Fix: Changed the return type with phpstan" This reverts commit 77342cfca2047a7a12e46afdc2c454ae8ddf9197. --- system/Debug/Exceptions.php | 4 ---- system/Debug/Timer.php | 2 +- system/Debug/Toolbar.php | 2 -- system/Debug/Toolbar/Collectors/Database.php | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/system/Debug/Exceptions.php b/system/Debug/Exceptions.php index 8f796010bef9..ef8b96d7e13e 100644 --- a/system/Debug/Exceptions.php +++ b/system/Debug/Exceptions.php @@ -100,7 +100,6 @@ public function __construct(ExceptionsConfig $config, $request, ResponseInterfac * @codeCoverageIgnore * * @return void - * @phpstan-return never|void */ public function initialize() { @@ -117,7 +116,6 @@ public function initialize() * @codeCoverageIgnore * * @return void - * @phpstan-return never|void */ public function exceptionHandler(Throwable $exception) { @@ -197,7 +195,6 @@ public function errorHandler(int $severity, string $message, ?string $file = nul * @codeCoverageIgnore * * @return void - * @phpstan-return never|void */ public function shutdownHandler() { @@ -254,7 +251,6 @@ protected function determineView(Throwable $exception, string $templatePath): st * Given an exception and status code will display the error to the client. * * @return void - * @phpstan-return never|void */ protected function render(Throwable $exception, int $statusCode) { diff --git a/system/Debug/Timer.php b/system/Debug/Timer.php index 216b10bab758..0ba376344914 100644 --- a/system/Debug/Timer.php +++ b/system/Debug/Timer.php @@ -132,7 +132,7 @@ public function has(string $name): bool * Returns its return value if any. * * @param string $name The name of the timer - * @phpstan-param callable(): mixed $callable callable to be executed + * @phpstan-param callable():mixed $callable callable to be executed * * @return array|bool|float|int|object|resource|string|null */ diff --git a/system/Debug/Toolbar.php b/system/Debug/Toolbar.php index 453a77241d60..440f10ddd48c 100644 --- a/system/Debug/Toolbar.php +++ b/system/Debug/Toolbar.php @@ -350,7 +350,6 @@ protected function roundTo(float $number, int $increments = 5): float * @param ResponseInterface $response * * @return void - * @phpstan-return never|void */ public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null) { @@ -439,7 +438,6 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r * @codeCoverageIgnore * * @return void - * @phpstan-return never|void */ public function respond() { diff --git a/system/Debug/Toolbar/Collectors/Database.php b/system/Debug/Toolbar/Collectors/Database.php index 9560ac361ff2..a40481c36fc6 100644 --- a/system/Debug/Toolbar/Collectors/Database.php +++ b/system/Debug/Toolbar/Collectors/Database.php @@ -75,7 +75,7 @@ public function __construct() * The static method used during Events to collect * data. * - * @internal + * @internal param $ array \CodeIgniter\Database\Query * * @return void */