mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
fix(test): fix redundant terminal output during phpunit (#1194)
This commit is contained in:
@@ -54,6 +54,10 @@ abstract class BaseCommand extends Command
|
||||
}
|
||||
|
||||
set_error_handler(static function ($error_no, $error_msg, $error_file, $error_line) {
|
||||
// Respect the @ suppression operator (error_reporting() returns 0 when @ is used)
|
||||
if (error_reporting() === 0) {
|
||||
return true;
|
||||
}
|
||||
$tips = [
|
||||
E_WARNING => ['PHP Warning: ', 'warning'],
|
||||
E_NOTICE => ['PHP Notice: ', 'notice'],
|
||||
|
||||
Reference in New Issue
Block a user