protected function isFatalError($type)
    {
        $errorCodes = [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE];

        if (\defined('FATAL_ERROR')) {
            $errorCodes[] = FATAL_ERROR;
        }

        return \in_array($type, $errorCodes);
    }