<commit_before><?php

    namespace PHPerian\CAIS\Report\Block\Attribute;

    use \PHPerian\CAIS\Report\Block\Attribute;
    use \PHPerian\CAIS\Interfaces\Attribute as AttributeInterface;
    use \PHPerian\Exceptions;

    class Integer extends Attribute implements AttributeInterface
    {

        public function setValue($value)
        {
            if(!is_int($value) || !preg_match('/^(0|[1-9]\\d*)$/', $value) || $value < 0) {
                throw new Exceptions\InvalidDataType('Integer attributes require their value to be a positive integer or the string-representation of one.');
            }
            $this->value = $value;
            if((int) str_pad('', $this->getLength(), '9') < $this->getValue()) {
                $limit = $this->getLength();
                throw new Exceptions\DataTruncated("Attribute value exceeds its {$limit} character limit.");
            }
        }

    }
<commit_msg>Update Integer Attribute<commit_after><?php

    namespace PHPerian\CAIS\Report\Block\Attribute;

    use \PHPerian\CAIS\Report\Block\Attribute;
    use \PHPerian\CAIS\Interfaces\Attribute as AttributeInterface;
    use \PHPerian\Exceptions;

    class Integer extends Attribute implements AttributeInterface
    {

        public function setValue($value)
        {
            if(!is_int($value) && !preg_match('/^(0|[1-9]\\d*)$/', $value) && $value < 0) {
                throw new Exceptions\InvalidDataType('Integer attributes require their value to be a positive integer or the string-representation of one.');
            }
            $this->value = $value;
            if((int) str_pad('', $this->getLength(), '9') < $this->getValue()) {
                $limit = $this->getLength();
                throw new Exceptions\DataTruncated("Attribute value exceeds its {$limit} character limit.");
            }
        }

    }

{'fraction_non_alphanumeric': 0.13167835941716136, 'fraction_numerical': 0.005396654074473826, 'mean_word_length': 2.439703153988868, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '131143', 'n_tokens_mistral': 523, 'n_tokens_neox': 500, 'n_words': 122}