<commit_before><?php

namespace G4\DataMapper\Engine\Solr;

use G4\DataMapper\Common\ComparisonFormatterInterface;
use G4\DataMapper\Common\Selection\Operator;

class SolrComparisonFormatter implements ComparisonFormatterInterface
{
    const BRACKET_CLOSE       = ']';
    const BRACKET_OPEN        = '[';

    const CURLY_BRACKET_CLOSE = '}';
    const CURLY_BRACKET_OPEN  = '{';

    const COLON               = ':';
    const TO                  = 'TO';
    const WILDCARD            = '*';

    const EMPTY_SPACE         = ' ';


    public function format($name, Operator $operator, $value)
    {
        if($operator->getSymbol() === Operator::EQUAL) {
            return $name . self::COLON . $value;
        } elseif ($operator->getSymbol() === Operator::GRATER_THAN) {
            return $name . self::COLON . self::CURLY_BRACKET_OPEN . $value . self::EMPTY_SPACE . self::TO . self::EMPTY_SPACE . self::WILDCARD . self::CURLY_BRACKET_CLOSE;
        } elseif ($operator->getSymbol() === Operator::LESS_THAN) {
            return $name . self::COLON . self::CURLY_BRACKET_OPEN . self::WILDCARD . self::EMPTY_SPACE . self::TO . self::EMPTY_SPACE . $value . self::CURLY_BRACKET_CLOSE;
        }
    }
}
<commit_msg>000 - Added logic for greater than operation.<commit_after><?php

namespace G4\DataMapper\Engine\Solr;

use G4\DataMapper\Common\ComparisonFormatterInterface;
use G4\DataMapper\Common\Selection\Operator;

class SolrComparisonFormatter implements ComparisonFormatterInterface
{
    const BRACKET_CLOSE       = ']';
    const BRACKET_OPEN        = '[';

    const CURLY_BRACKET_CLOSE = '}';
    const CURLY_BRACKET_OPEN  = '{';

    const COLON               = ':';
    const TO                  = 'TO';
    const WILDCARD            = '*';

    const EMPTY_SPACE         = ' ';


    public function format($name, Operator $operator, $value)
    {
        if($operator->getSymbol() === Operator::EQUAL) {
            return $name . self::COLON . $value;
        } elseif ($operator->getSymbol() === Operator::GRATER_THAN) {
            return $name . self::COLON . self::CURLY_BRACKET_OPEN . $value . self::EMPTY_SPACE . self::TO . self::EMPTY_SPACE . self::WILDCARD . self::CURLY_BRACKET_CLOSE;
        } elseif ($operator->getSymbol() === Operator::LESS_THAN) {
            return $name . self::COLON . self::CURLY_BRACKET_OPEN . self::WILDCARD . self::EMPTY_SPACE . self::TO . self::EMPTY_SPACE . $value . self::CURLY_BRACKET_CLOSE;
        } elseif ($operator->getSymbol() === Operator::GRATER_THAN_OR_EQUAL) {
            return $name . self::COLON . self::BRACKET_OPEN . $value . self::EMPTY_SPACE . self::TO . self::EMPTY_SPACE . self::WILDCARD . self::BRACKET_CLOSE;
        }
    }
}

{'fraction_non_alphanumeric': 0.1374861776631036, 'fraction_numerical': 0.003317360855141909, 'mean_word_length': 2.7746870653685676, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '966901', 'n_tokens_mistral': 895, 'n_tokens_neox': 884, 'n_words': 151}