<commit_before><?php
namespace Nf\Error;

class Handler extends \Exception
{

    static $lastError = array(
        'type' => 'error',
        'httpCode' => 0,
        'message' => '',
        'number' => 0,
        'file' => '',
        'line' => 0,
        'trace' => ''
    );

    public static function getLastError()
    {
        return self::$lastError;
    }

    public static function disableErrorHandler()
    {
        while (set_error_handler(create_function('$errno,$errstr', 'return false;'))) {
            // Unset the error handler we just set.
            restore_error_handler();
            // Unset the previous error handler.
            restore_error_handler();
        }
        // Restore the built-in error handler.
        restore_error_handler();
        
        while (set_exception_handler(create_function('$e', 'return false;'))) {
            // Unset the error handler we just set.
            restore_exception_handler();
            // Unset the previous error handler.
            restore_exception_handler();
        }
        // Restore the built-in error handler.
        restore_exception_handler();
    }

    public static function handleError($errno = null, $errstr = 0, $errfile = null, $errline = null)
    {
        $error_reporting = error_reporting();
        if ($error_reporting == 0) {<commit_msg>removed useless junk<commit_after><?php
namespace Nf\Error;

class Handler extends \Exception
{

    static $lastError = array(
        'type' => 'error',
        'httpCode' => 0,
        'message' => '',
        'number' => 0,
        'file' => '',
        'line' => 0,
        'trace' => ''
    );

    public static function getLastError()
    {
        return self::$lastError;
    }

    public static function disableErrorHandler()
    {
        while (set_error_handler(create_function('$errno,$errstr', 'return false;'))) {
            // Unset the error handler we just set.
            restore_error_handler();
            // Unset the previous error handler.
            restore_error_handler();
        }
        // Restore the built-in error handler.
        restore_error_handler();
        
        // Restore the built-in exception handler.
        restore_exception_handler();
    }

    public static function handleError($errno = null, $errstr = 0, $errfile = null, $errline = null)
    {
        $error_reporting = error_reporting();
        if ($error_reporting == 0) {
{'fraction_non_alphanumeric': 0.12244062244062244, 'fraction_numerical': 0.004095004095004095, 'mean_word_length': 2.049937578027466, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4697775', 'n_tokens_mistral': 684, 'n_tokens_neox': 662, 'n_words': 174}