diff --git a/.gitignore b/.gitignore index 5974bad..3eed260 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.vscode/ /vendor/ .php-cs-fixer.php composer.lock diff --git a/src/ErrorHandlers/ThrowErrorException.php b/src/ErrorHandlers/ThrowErrorException.php index 15e1da6..381ac3f 100644 --- a/src/ErrorHandlers/ThrowErrorException.php +++ b/src/ErrorHandlers/ThrowErrorException.php @@ -37,19 +37,19 @@ class ThrowErrorException /** * Converts an internal PHP error into an ErrorException. * - * @param int $severity The severity of the error - * @param string $message The error message - * @param ?string $file The name of the file the error was raised in - * @param ?int $line The line number the error was raised in + * @param int $errno The severity of the error + * @param string $errstr The error message + * @param ?string $errfile The name of the file the error was raised in + * @param ?int $errline The line number the error was raised in * * @return bool Always returns FALSE when not throwing an exception * * @throws ErrorException */ - public function __invoke(int $severity = E_USER_ERROR, string $message = '', ?string $file = null, ?int $line = null): bool + public function __invoke(int $errno = E_USER_ERROR, string $errstr = '', ?string $errfile = null, ?int $errline = null): bool { - if ((error_reporting() & $severity) > 0) { - throw new ErrorException($message, 0, $severity, $file, $line); + if ((error_reporting() & $errno) > 0) { + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } return false; }