<commit_before><?php

namespace Predis\Options;

class CustomOption extends Option {
    private $__validate, $_default;

    public function __construct(Array $options) {
        $validate = isset($options['validate']) ? $options['validate'] : 'parent::validate';
        $default  = isset($options['default']) ? $options['default'] : 'parent::getDefault';
        if (!is_callable($validate) || !is_callable($default)) {
            throw new \InvalidArgumentException("Validate and default must be callable");
        }
        $this->_validate = $validate;
        $this->_default  = $default;
    }

    public function validate($value) {
        return call_user_func($this->_validate, $value);
    }

    public function getDefault() {
        return $this->validate(call_user_func($this->_default));
    }
}<commit_msg>Fix wrong name for private field.<commit_after><?php

namespace Predis\Options;

class CustomOption extends Option {
    private $_validate, $_default;

    public function __construct(Array $options) {
        $validate = isset($options['validate']) ? $options['validate'] : 'parent::validate';
        $default  = isset($options['default']) ? $options['default'] : 'parent::getDefault';
        if (!is_callable($validate) || !is_callable($default)) {
            throw new \InvalidArgumentException("Validate and default must be callable");
        }
        $this->_validate = $validate;
        $this->_default  = $default;
    }

    public function validate($value) {
        return call_user_func($this->_validate, $value);
    }

    public function getDefault() {
        return $this->validate(call_user_func($this->_default));
    }
}
{'fraction_non_alphanumeric': 0.14405260011954574, 'fraction_numerical': 0.0, 'mean_word_length': 3.464, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5090129', 'n_tokens_mistral': 447, 'n_tokens_neox': 447, 'n_words': 101}