summaryrefslogtreecommitdiffstats
path: root/inc/errorhandler.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/errorhandler.inc.php')
-rw-r--r--inc/errorhandler.inc.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/errorhandler.inc.php b/inc/errorhandler.inc.php
index c7a32b02..8e49353c 100644
--- a/inc/errorhandler.inc.php
+++ b/inc/errorhandler.inc.php
@@ -1,5 +1,7 @@
<?php
+use JetBrains\PhpStorm\NoReturn;
+
class ErrorHandler
{
@@ -10,7 +12,8 @@ class ErrorHandler
* and all globally defined variables.
* (As this might reveal sensitive data you should never enable it in production)
*/
- public static function traceError($message)
+ #[NoReturn]
+ public static function traceError(string $message): void
{
if ((defined('API') && API) || (defined('AJAX') && AJAX) || php_sapi_name() === 'cli') {
error_log('API ERROR: ' . $message);
@@ -84,7 +87,7 @@ SADFACE;
exit(0);
}
- public static function formatBacktraceHtml($trace): string
+ public static function formatBacktraceHtml(array $trace): string
{
$output = '';
foreach ($trace as $idx => $line) {
@@ -104,7 +107,7 @@ SADFACE;
return $output;
}
- public static function formatBacktracePlain($trace): string
+ public static function formatBacktracePlain(array $trace): string
{
$output = '';
foreach ($trace as $idx => $line) {
@@ -121,7 +124,7 @@ SADFACE;
return $output;
}
- private static function formatArgument($arg, $expandArray = true)
+ private static function formatArgument($arg, bool $expandArray = true): string
{
if (is_string($arg)) {
$arg = "'$arg'";