<commit_before><?php
/**
* Functions
*
* PHP version 5
*
* @category Functions
* @package  Innebandybokning
* @author   <NAME> <<EMAIL>>
* @license  http://www.opensource.org/licenses/mit-license.php MIT
* @link     https://github.com/thulin82/arsenal_webscrape
*/
/**
* Functions
*
* PHP version 5
*
* @category Functions
* @package  Innebandybokning
* @author   <NAME> <<EMAIL>>
* @license  http://www.opensource.org/licenses/mit-license.php MIT
* @link     https://github.com/thulin82/arsenal_webscrape
*/
class Functions
{
    /**
    * Clean Input
    *
    * PHP version 5
    *
    * @param String $input The string you want to clean
    *
    * @category Functions
    * @package  Innebandybokning
    * @author   <NAME> <<EMAIL>>
    * @license  http://www.opensource.org/licenses/mit-license.php MIT
    * @link     https://github.com/thulin82/innebandybokning
    *
    * @return String $output
    */
    public function cleanInput($input)
    {
        $search = array(
        '@<script[^>]*?>.*?</script>@si',   // Strip out javascript
        '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
        '@<style[^>]*?>.*?</style>@siU',    // Strip style tags properly
        '@<![\s\S]*?--[ \t\n\r]*>@'         // Strip multi-line comments
        );

        $output = preg_replace($search, '', $input);
        return $output;
    }

    /**
    * Sanitize
    *
    * PHP version 5
    *
    * @param String $input The string you want to clean
    *
    * @category Functions
    * @package  Innebandybokning
    * @author   <NAME> <<EMAIL>>
    * @license  http://www.opensource.org/licenses/mit-license.php MIT
    * @link     https://github.com/thulin82/innebandybokning
    *
    * @return Array<String>|String $output
    */
    public function sanitize($input)
    {
        $output ='';
        if (is_array($input)) {
            foreach ($input as $var=>$val) {
                $output[$var] = self::sanitize($val);
            }<commit_msg>Fixed return type<commit_after><?php
/**
* Functions
*
* PHP version 5
*
* @category Functions
* @package  Innebandybokning
* @author   <NAME> <<EMAIL>>
* @license  http://www.opensource.org/licenses/mit-license.php MIT
* @link     https://github.com/thulin82/arsenal_webscrape
*/
/**
* Functions
*
* PHP version 5
*
* @category Functions
* @package  Innebandybokning
* @author   <NAME> <<EMAIL>>
* @license  http://www.opensource.org/licenses/mit-license.php MIT
* @link     https://github.com/thulin82/arsenal_webscrape
*/
class Functions
{
    /**
    * Clean Input
    *
    * PHP version 5
    *
    * @param String $input The string you want to clean
    *
    * @category Functions
    * @package  Innebandybokning
    * @author   <NAME> <<EMAIL>>
    * @license  http://www.opensource.org/licenses/mit-license.php MIT
    * @link     https://github.com/thulin82/innebandybokning
    *
    * @return String $output
    */
    public function cleanInput($input)
    {
        $search = array(
        '@<script[^>]*?>.*?</script>@si',   // Strip out javascript
        '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
        '@<style[^>]*?>.*?</style>@siU',    // Strip style tags properly
        '@<![\s\S]*?--[ \t\n\r]*>@'         // Strip multi-line comments
        );

        $output = preg_replace($search, '', $input);
        return $output;
    }

    /**
    * Sanitize
    *
    * PHP version 5
    *
    * @param String $input The string you want to clean
    *
    * @category Functions
    * @package  Innebandybokning
    * @author   <NAME> <<EMAIL>>
    * @license  http://www.opensource.org/licenses/mit-license.php MIT
    * @link     https://github.com/thulin82/innebandybokning
    *
    * @return Array|String $output
    */
    public function sanitize($input)
    {
        $output ='';
        if (is_array($input)) {
            foreach ($input as $var=>$val) {
                $output[$var] = self::sanitize($val);
            }
{'fraction_non_alphanumeric': 0.1681012658227848, 'fraction_numerical': 0.0060759493670886075, 'mean_word_length': 2.2734051367025683, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 48, 'https://': 8, 'lorem ipsum': 0, 'www.': 8, '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': '462644', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1330, 'n_words': 268}