diff --git a/libraries/classes/Pdf.php b/libraries/classes/Pdf.php index 7e4d3d6ba8..77518f35aa 100644 --- a/libraries/classes/Pdf.php +++ b/libraries/classes/Pdf.php @@ -130,7 +130,7 @@ class Pdf extends TCPDF * @param string $errorMessage the error message */ // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps - public function Error(mixed $errorMessage = ''): void + public function Error(mixed $errorMessage = ''): never { echo Message::error( __('Error while creating PDF:') . ' ' . $errorMessage, diff --git a/libraries/classes/Plugins/Schema/ExportRelationSchema.php b/libraries/classes/Plugins/Schema/ExportRelationSchema.php index 1e9ea57459..e42692acdb 100644 --- a/libraries/classes/Plugins/Schema/ExportRelationSchema.php +++ b/libraries/classes/Plugins/Schema/ExportRelationSchema.php @@ -250,7 +250,7 @@ class ExportRelationSchema * @param string $type Schema Type * @param string $errorMessage The error message */ - public static function dieSchema(int $pageNumber, string $type = '', string $errorMessage = ''): void + public static function dieSchema(int $pageNumber, string $type = '', string $errorMessage = ''): never { echo '
' , __('SCHEMA ERROR: ') , $type , '
' , "\n"; if (! empty($errorMessage)) { diff --git a/libraries/classes/ResponseRenderer.php b/libraries/classes/ResponseRenderer.php index c901f02e31..9e45c67a86 100644 --- a/libraries/classes/ResponseRenderer.php +++ b/libraries/classes/ResponseRenderer.php @@ -368,7 +368,7 @@ class ResponseRenderer /** * Sends an HTML response to the browser */ - public function response(): void + public function response(): never { $this->buffer->stop(); if ($this->HTML === '') { diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php index 8898741cf0..532cec051a 100644 --- a/libraries/classes/Sql.php +++ b/libraries/classes/Sql.php @@ -486,7 +486,7 @@ class Sql * @param string $error error after executing the query * @param string $fullSqlQuery full sql query */ - private function handleQueryExecuteError(bool $isGotoFile, string $error, string $fullSqlQuery): void + private function handleQueryExecuteError(bool $isGotoFile, string $error, string $fullSqlQuery): never { if ($isGotoFile) { $message = Message::rawError($error); diff --git a/libraries/classes/UrlRedirector.php b/libraries/classes/UrlRedirector.php index cb89199a25..21c87bc5c6 100644 --- a/libraries/classes/UrlRedirector.php +++ b/libraries/classes/UrlRedirector.php @@ -12,8 +12,7 @@ use function preg_match; */ final class UrlRedirector { - /** @psalm-return never */ - public static function redirect(string $url): void + public static function redirect(string $url): never { // Load database service because services.php is not available here $GLOBALS['dbi'] = DatabaseInterface::load();