From d8268e464fc2cd1680e303340ed8c537f9ea1e2f Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Sun, 31 Mar 2024 17:47:24 +0200 Subject: [PATCH] Fix code-styling --- src/ErrorHandlers/ThrowErrorException.php | 8 ++++++-- src/ErrorHandlers/TriggerExceptionError.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ErrorHandlers/ThrowErrorException.php b/src/ErrorHandlers/ThrowErrorException.php index f9ff9af..271b77b 100644 --- a/src/ErrorHandlers/ThrowErrorException.php +++ b/src/ErrorHandlers/ThrowErrorException.php @@ -52,8 +52,12 @@ class ThrowErrorException * * @throws ErrorException if `error_reporting` is set to report the error */ - public function __invoke(int $errno = E_USER_ERROR, string $errstr = '', ?string $errfile = null, ?int $errline = null): bool - { + public function __invoke( + int $errno = \E_USER_ERROR, + string $errstr = '', + ?string $errfile = null, + ?int $errline = null + ): bool { if ((error_reporting() & $errno) > 0) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } diff --git a/src/ErrorHandlers/TriggerExceptionError.php b/src/ErrorHandlers/TriggerExceptionError.php index feddf1c..16e9527 100644 --- a/src/ErrorHandlers/TriggerExceptionError.php +++ b/src/ErrorHandlers/TriggerExceptionError.php @@ -57,6 +57,6 @@ class TriggerExceptionError $exception->getLine(), $exception->getMessage() ); - trigger_error($message, E_USER_ERROR); + trigger_error($message, \E_USER_ERROR); } }