Code Duplication    Length = 6-8 lines in 2 locations

src/SQLQueryBuilder.php 2 locations

@@ 167-174 (lines=8) @@
164
    protected function buildQueryForAnd($queryBuilder, $key, $value)
165
    {
166
        $sqlOptions = self::buildFilter([$key => $value]);
167
        if (in_array($sqlOptions['method'], ['in', 'notIn'], true)) {
168
            $queryBuilder->andWhere(
169
                $queryBuilder->expr()->{$sqlOptions['method']}(
170
                    $this->collection . '.' . $sqlOptions['key'], $sqlOptions['value']
171
                )
172
            );
173
            return $queryBuilder;
174
        }
175
        $queryBuilder->andWhere(
176
            '`' . $this->collection . '`.`' . $sqlOptions['key'].'`'
177
            . ' ' . $sqlOptions['operand']
@@ 189-194 (lines=6) @@
186
            $subKey = array_keys($orValue)[0];
187
            $subValue = $orValue[$subKey];
188
            $sqlOptions = self::buildFilter([$subKey => $subValue]);
189
            if (in_array($sqlOptions['method'], ['in', 'notIn'], true)) {
190
                $orQuery[] =  $queryBuilder->expr()->{$sqlOptions['method']}(
191
                    $this->collection . '.' . $sqlOptions['key'], $sqlOptions['value']
192
                );
193
                continue;
194
            }
195
            $orQuery[] =
196
                '`' . $this->collection . '`.`' . $sqlOptions['key'].'`'
197
                . ' ' . $sqlOptions['operand']