<commit_before><?php

namespace Phrest\API;

class ErrorCodes
{
    public function getErrorCodes()
    {
        $reflectionClass = new \ReflectionClass($this);
        $errorCodes = $reflectionClass->getConstants();
        unset($errorCodes['LAST_PHREST_ERROR_CODE']);
        asort($errorCodes);
        return $errorCodes;
    }

    const UNKNOWN = 0;

    const INTERNAL_SERVER_ERROR = 1;

    const JSON_DECODE_ERROR = 2;
    const JSON_DECODE_ERROR_DEPTH = 3;
    const JSON_DECODE_ERROR_STATE_MISMATCH = 4;
    const JSON_DECODE_ERROR_CTRL_CHAR = 5;
    const JSON_DECODE_ERROR_SYNTAX = 6;
    const JSON_DECODE_ERROR_UTF8 = 7;
    const JSON_DECODE_ERROR_RECURSION = 8;
    const JSON_DECODE_ERROR_INF_OR_NAN = 9;
    const JSON_DECODE_ERROR_UNSUPPORTED_TYPE = 10;

    const REQUEST_VALIDATION_ADDITIONAL_ITEMS = 11;
    const REQUEST_VALIDATION_ADDITIONAL_PROP = 12;
    const REQUEST_VALIDATION_ALL_OF = 13;
    const REQUEST_VALIDATION_ANY_OF = 14;
    const REQUEST_VALIDATION_DEPENDENCIES = 15;
    const REQUEST_VALIDATION_DISALLOW = 16;
    const REQUEST_VALIDATION_DIVISIBLE_BY = 17;
    const REQUEST_VALIDATION_ENUM = 18;
    const REQUEST_VALIDATION_EXCLUSIVE_MAXIMUM = 19;
    const REQUEST_VALIDATION_EXCLUSIVE_MINIMUM = 20;
    const REQUEST_VALIDATION_FORMAT = 21;
    const REQUEST_VALIDATION_MAXIMUM = 22;
    const REQUEST_VALIDATION_MAX_ITEMS = 23;
    const REQUEST_VALIDATION_MAX_LENGTH = 24;
    const REQUEST_VALIDATION_MAX_PROPERTIES = 25;
    const REQUEST_VALIDATION_MINIMUM = 26;
    const REQUEST_VALIDATION_MIN_ITEMS = 27;
    const REQUEST_VALIDATION_MIN_LENGTH = 28;
    const REQUEST_VALIDATION_MIN_PROPERTIES = 29;
    const REQUEST_VALIDATION_MISSING_MAXIMUM = 30;
    const REQUEST_VALIDATION_MISSING_MINIMUM = 31;
    const REQUEST_VALIDATION_MULTIPLE_OF = 32;
    const REQUEST_VALIDATION_NOT = 33;
    const REQUEST_VALIDATION_ONE_OF = 34;
    const REQUEST_VALIDATION_PATTERN = 35;
    const REQUEST_VALIDATION_PREGEX = 36;
    const REQUEST_VALIDATION_REQUIRED = 37;
    const REQUEST_VALIDATION_REQUIRES = 38;
    const REQUEST_VALIDATION_SCHEMA = 39;
    const REQUEST_VALIDATION_TYPE = 40;
    const REQUEST_VALIDATION_UNIQUE_ITEMS = 41;

    const REQUEST_PARAMETER_VALIDATION = 42;
    const PATH_NOT_FOUND = 43;

    const LAST_PHREST_ERROR_CODE = 43;
}<commit_msg>Reserved 1000 error codes for phrest errors<commit_after><?php

namespace Phrest\API;

class ErrorCodes
{
    public function getErrorCodes()
    {
        $reflectionClass = new \ReflectionClass($this);
        $errorCodes = $reflectionClass->getConstants();
        unset($errorCodes['LAST_PHREST_ERROR_CODE']);
        asort($errorCodes);
        return $errorCodes;
    }

    const UNKNOWN = 0;

    const INTERNAL_SERVER_ERROR = 1;

    const JSON_DECODE_ERROR = 2;
    const JSON_DECODE_ERROR_DEPTH = 3;
    const JSON_DECODE_ERROR_STATE_MISMATCH = 4;
    const JSON_DECODE_ERROR_CTRL_CHAR = 5;
    const JSON_DECODE_ERROR_SYNTAX = 6;
    const JSON_DECODE_ERROR_UTF8 = 7;
    const JSON_DECODE_ERROR_RECURSION = 8;
    const JSON_DECODE_ERROR_INF_OR_NAN = 9;
    const JSON_DECODE_ERROR_UNSUPPORTED_TYPE = 10;

    const REQUEST_VALIDATION_ADDITIONAL_ITEMS = 11;
    const REQUEST_VALIDATION_ADDITIONAL_PROP = 12;
    const REQUEST_VALIDATION_ALL_OF = 13;
    const REQUEST_VALIDATION_ANY_OF = 14;
    const REQUEST_VALIDATION_DEPENDENCIES = 15;
    const REQUEST_VALIDATION_DISALLOW = 16;
    const REQUEST_VALIDATION_DIVISIBLE_BY = 17;
    const REQUEST_VALIDATION_ENUM = 18;
    const REQUEST_VALIDATION_EXCLUSIVE_MAXIMUM = 19;
    const REQUEST_VALIDATION_EXCLUSIVE_MINIMUM = 20;
    const REQUEST_VALIDATION_FORMAT = 21;
    const REQUEST_VALIDATION_MAXIMUM = 22;
    const REQUEST_VALIDATION_MAX_ITEMS = 23;
    const REQUEST_VALIDATION_MAX_LENGTH = 24;
    const REQUEST_VALIDATION_MAX_PROPERTIES = 25;
    const REQUEST_VALIDATION_MINIMUM = 26;
    const REQUEST_VALIDATION_MIN_ITEMS = 27;
    const REQUEST_VALIDATION_MIN_LENGTH = 28;
    const REQUEST_VALIDATION_MIN_PROPERTIES = 29;
    const REQUEST_VALIDATION_MISSING_MAXIMUM = 30;
    const REQUEST_VALIDATION_MISSING_MINIMUM = 31;
    const REQUEST_VALIDATION_MULTIPLE_OF = 32;
    const REQUEST_VALIDATION_NOT = 33;
    const REQUEST_VALIDATION_ONE_OF = 34;
    const REQUEST_VALIDATION_PATTERN = 35;
    const REQUEST_VALIDATION_PREGEX = 36;
    const REQUEST_VALIDATION_REQUIRED = 37;
    const REQUEST_VALIDATION_REQUIRES = 38;
    const REQUEST_VALIDATION_SCHEMA = 39;
    const REQUEST_VALIDATION_TYPE = 40;
    const REQUEST_VALIDATION_UNIQUE_ITEMS = 41;

    const REQUEST_PARAMETER_VALIDATION = 42;
    const PATH_NOT_FOUND = 43;

    const LAST_PHREST_ERROR_CODE = 1000;
}
{'fraction_non_alphanumeric': 0.05643437366395896, 'fraction_numerical': 0.03591278324070116, 'mean_word_length': 4.216276477146042, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '98242', 'n_tokens_mistral': 1867, 'n_tokens_neox': 1621, 'n_words': 310}