<commit_before><?php

namespace Fishfin;

/**
 * Standalone data sanitization and validation class.
 *
 * @author      fishfin
 * @link        http://aalapshah.in
 * @version     1.0.0
 * @license     MIT
 * 
 * Valigator is a standalone PHP sanitization and validation class that does not
 * require any framework to do its job. It is a very detailed implementation and
 * I hope you will find it useful.
 * 
 * Valigator should work with PHP 5.5.* upwards.
 * 
 * Data sanitization and validation can be run independently of each other, or
 * in succession.
 */
class Valigator
{
    const PLAIN_ERRORMSGS = 0;
    const FIELDS_AND_PLAIN_ERRORMSGS = 1;
    const HTML_ERRORMSGS = 2;
    const FIELDS_AND_HTML_ERRORMSGS = 3;
    const FORCE_FULLSTOP_ON_ERRORMSGS = TRUE;

    // map options passed to functions(parameters) to be called internally
    protected $_aliases = [
        'allow_fraction' => FILTER_FLAG_ALLOW_FRACTION,
        'allow_hex' => FILTER_FLAG_ALLOW_HEX,
        'allow_octal' => FILTER_FLAG_ALLOW_OCTAL,
        'allow_scientific' => FILTER_FLAG_ALLOW_SCIENTIFIC,
        'allow_thousand' => FILTER_FLAG_ALLOW_THOUSAND,
        'alphabet' => 'alphabetic',
        'bool' => 'boolean',
        'casttonum' => 'casttonumeric',
        'casttonumber' => 'casttonumeric',
        'encode_amp' => FILTER_FLAG_ENCODE_AMP,<commit_msg>Update Valigator.php<commit_after><?php

namespace Fishfin;

/**
 * Standalone data sanitization and validation class.
 *
 * @author      fishfin
 * @link        http://aalapshah.in
 * @version     1.0.1
 * @license     MIT
 * 
 * Valigator is a standalone PHP sanitization and validation class that does not
 * require any framework to do its job. It is a very detailed implementation and
 * I hope you will find it useful.
 * 
 * Valigator should work with PHP 5.5.* upwards.
 * 
 * Data sanitization and validation can be run independently of each other, or
 * in succession.
 */
class Valigator
{
    const PLAIN_ERRORMSGS = 0;
    const FIELDS_AND_PLAIN_ERRORMSGS = 1;
    const HTML_ERRORMSGS = 2;
    const FIELDS_AND_HTML_ERRORMSGS = 3;
    const FORCE_FULLSTOP_ON_ERRORMSGS = TRUE;

    // map options passed to functions(parameters) to be called internally
    protected $_aliases = [
        'allow_fraction' => FILTER_FLAG_ALLOW_FRACTION,
        'allow_hex' => FILTER_FLAG_ALLOW_HEX,
        'allow_octal' => FILTER_FLAG_ALLOW_OCTAL,
        'allow_scientific' => FILTER_FLAG_ALLOW_SCIENTIFIC,
        'allow_thousand' => FILTER_FLAG_ALLOW_THOUSAND,
        'alphabet' => 'alphabetic',
        'bool' => 'boolean',
        'casttonum' => 'casttonumeric',
        'casttonumber' => 'casttonumeric',
        'encode_amp' => FILTER_FLAG_ENCODE_AMP,
{'fraction_non_alphanumeric': 0.08970099667774087, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 3.214618973561431, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2310564', 'n_tokens_mistral': 907, 'n_tokens_neox': 856, 'n_words': 238}