src/Parser/Doctrine/WherePartialParser.php
final public static function parse(
        array $queryBuilderFieldsToProperties,
        RuleGroupInterface $ruleGroup,
        array $embeddableFieldsToProperties,
        array $embeddableInsideEmbeddableFieldsToProperties,
        string $className
    ): ParsedRuleGroup {
        foreach ($queryBuilderFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = StringManipulator::replaceAllDotsExceptLast(SelectPartialParser::OBJECT_WORD.'.'.$property);
        }
        foreach ($embeddableFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = SelectPartialParser::OBJECT_WORD.StringManipulator::replaceAllDotsExceptLastTwo('.'.$property);
        }
        foreach ($embeddableInsideEmbeddableFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = SelectPartialParser::OBJECT_WORD.StringManipulator::replaceAllDotsExceptLastThree('.'.$property);
        }

        static::$parameters = [];
        static::$dqlPartialWhereString = '';

        // populate static::$dqlPartialWhereString and static::$parameters
        if (!(
            0 === count($ruleGroup->getRuleGroups())
            && 0 === count($ruleGroup->getRules())
        )) {
            static::parseRuleGroup($ruleGroup, ' WHERE ( ', ' ) ');
        }

        return new ParsedRuleGroup(static::$dqlPartialWhereString, static::$parameters, $className);
    }
final public static function parse(
        array $queryBuilderFieldsToProperties,
        RuleGroupInterface $ruleGroup,
        array $embeddableFieldsToProperties,
        array $embeddableInsideEmbeddableFieldsToProperties,
        string $className
    ): ParsedRuleGroup {
        foreach ($queryBuilderFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = StringManipulator::replaceAllDotsExceptLast(SelectPartialParser::OBJECT_WORD.'.'.$property);
        }
        foreach ($embeddableFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = SelectPartialParser::OBJECT_WORD.StringManipulator::replaceAllDotsExceptLastTwo('.'.$property);
        }
        foreach ($embeddableInsideEmbeddableFieldsToProperties as $field => $property) {
            static::$queryBuilderFieldsToWhereAlias[$field] = SelectPartialParser::OBJECT_WORD.StringManipulator::replaceAllDotsExceptLastThree('.'.$property);
        }

        static::$parameters = [];
        static::$dqlPartialWhereString = '';

        // populate static::$dqlPartialWhereString and static::$parameters
        if (!(
            0 === count($ruleGroup->getRuleGroups())
            && 0 === count($ruleGroup->getRules())
        )) {
            static::parseRuleGroup($ruleGroup, ' WHERE ( ', ' ) ');
        }

        return new ParsedRuleGroup(static::$dqlPartialWhereString, static::$parameters, $className);
    }
@param array              $queryBuilderFieldsToProperties
@param RuleGroupInterface $ruleGroup
@param array              $embeddableFieldsToProperties
@param array              $embeddableInsideEmbeddableFieldsToProperties
@param string             $className

@return ParsedRuleGroup