src/Leevel/Kernel/Bootstrap/RegisterRuntime.php
public function handle(IApp $app): void
    {
        $this->app = $app;

        $test = 2 === func_num_args();

        if (!$test) {
            // @codeCoverageIgnoreStart
            error_reporting(E_ALL);

            set_error_handler([$this, 'setErrorHandle']);

            set_exception_handler([$this, 'setExceptionHandler']);

            register_shutdown_function([$this, 'registerShutdownFunction']);

            if ('production' === $app->environment()) {
                ini_set('display_errors', 'Off');
            }
            // @codeCoverageIgnoreEnd
        }
    }
public function handle(IApp $app): void
    {
        $this->app = $app;

        $test = 2 === func_num_args();

        if (!$test) {
            // @codeCoverageIgnoreStart
            error_reporting(E_ALL);

            set_error_handler([$this, 'setErrorHandle']);

            set_exception_handler([$this, 'setExceptionHandler']);

            register_shutdown_function([$this, 'registerShutdownFunction']);

            if ('production' === $app->environment()) {
                ini_set('display_errors', 'Off');
            }
            // @codeCoverageIgnoreEnd
        }
    }
响应.

@param \Leevel\Kernel\IApp $app