diff --git a/src/Functions/throwError.php b/src/Functions/throwErrorException.php similarity index 91% rename from src/Functions/throwError.php rename to src/Functions/throwErrorException.php index debfe54..5eb94a2 100644 --- a/src/Functions/throwError.php +++ b/src/Functions/throwErrorException.php @@ -26,7 +26,7 @@ use ErrorException; /** * Handles an internal PHP error and throws it as ErrorException. - * @example set_error_handler('\\OCC\\Basics\\Functions\\throwError', E_ALL); + * @example set_error_handler('\\OCC\\Basics\\Functions\\throwErrorException'); * * @author Sebastian Meyer * @package opencultureconsulting/basics @@ -40,7 +40,7 @@ use ErrorException; * * @throws \ErrorException */ -function throwError(int $severity = E_ALL, string $message = '', ?string $filename = null, ?int $line = null): bool +function throwErrorException(int $severity = E_ALL, string $message = '', ?string $filename = null, ?int $line = null): bool { if (error_reporting() & $severity) { throw new ErrorException($message, 0, $severity, $filename, $line);