<commit_before><?php

/**
 * Output library
 * @author M2Mobi, <NAME>
 */
class Output
{

    /**
     * Constructor
     */
    public function __construct()
    {

    }

    /**
     * Destructor
     */
    public function __destruct()
    {

    }

    /**
     * Print given message immediatly
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_print($msg)
    {
        require_once("class.m2datetime.inc.php");
        echo M2DateTime::get_datetime() . ": " . $msg;
    }

    /**
     * Print status information ([ok] or [failed])
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_print_status($bool)
    {
        require_once("class.m2datetime.inc.php");
        if ($bool === TRUE)
        {
            echo "[ok]\n";
        }
        else
        {
            echo "[failed]\n";
        }
    }

    /**
     * Print given message immediatly
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_println($msg)
    {
        require_once("class.m2datetime.inc.php");
        echo M2DateTime::get_datetime() . ": " . $msg . "\n";
    }

}

?><commit_msg>application: Add error() function to Output class<commit_after><?php

/**
 * Output library
 * @author M2Mobi, <NAME>
 */
class Output
{

    /**
     * Constructor
     */
    public function __construct()
    {

    }

    /**
     * Destructor
     */
    public function __destruct()
    {

    }

    /**
     * Print given message immediatly
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_print($msg)
    {
        require_once("class.m2datetime.inc.php");
        echo M2DateTime::get_datetime() . ": " . $msg;
    }

    /**
     * Print status information ([ok] or [failed])
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_print_status($bool)
    {
        require_once("class.m2datetime.inc.php");
        if ($bool === TRUE)
        {
            echo "[ok]\n";
        }
        else
        {
            echo "[failed]\n";
        }
    }

    /**
     * Print given message immediatly
     * @param String $msg Message to print
     * @return void
     */
    public static function cli_println($msg)
    {
        require_once("class.m2datetime.inc.php");
        echo M2DateTime::get_datetime() . ": " . $msg . "\n";
    }

    /**
     * Trigger a PHP error
     * @param String $info The error string that should be printed
     * @return void
     */
    public static function error($info)
    {
        if (isset($_GET['controller']) && isset($_GET['method']))
        {
            trigger_error($_GET['controller'] . "/" . $_GET['method'] . ": " . $info);
        }
        else
        {
            trigger_error($info);
        }
    }

}

?>
{'fraction_non_alphanumeric': 0.13841905419399378, 'fraction_numerical': 0.004142216085605799, 'mean_word_length': 1.7134831460674158, 'pattern_counts': {'":': 5, '<': 7, '<?xml version=': 0, '>': 7, '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': '6807762', 'n_tokens_mistral': 888, 'n_tokens_neox': 871, 'n_words': 202}