Code Duplication    Length = 7-10 lines in 2 locations

src/Utils/Query.php 1 location

@@ 604-610 (lines=7) @@
601
                continue;
602
            }
603
604
            if ($token->type === Token::TYPE_OPERATOR) {
605
                if ($token->value === '(') {
606
                    ++$brackets;
607
                } elseif ($token->value === ')') {
608
                    --$brackets;
609
                }
610
            }
611
612
            if ($brackets == 0) {
613
                // Checking if the section was changed.

src/Components/Condition.php 1 location

@@ 182-191 (lines=10) @@
179
                }
180
            }
181
182
            if ($token->type === Token::TYPE_OPERATOR) {
183
                if ($token->value === '(') {
184
                    ++$brackets;
185
                } elseif ($token->value === ')') {
186
                    if ($brackets == 0) {
187
                        break;
188
                    }
189
                    --$brackets;
190
                }
191
            }
192
193
            $expr->expr .= $token->token;
194
            if (($token->type === Token::TYPE_NONE)