Code Duplication    Length = 12-12 lines in 2 locations

src/SQLParser/PHPSQLCreator.php 2 locations

@@ 216-227 (lines=12) @@
213
            return '';
214
        }
215
        $sql = '';
216
        foreach ($parsed['data'] as $k => $v) {
217
            $len = strlen($sql);
218
            $sql .= $this->processConstant($v);
219
            $sql .= $this->processFunction($v);
220
            $sql .= $this->processOperator($v);
221
222
            if ($len == strlen($sql)) {
223
                throw new UnableToCreateSQLException(ExpressionType::RECORD, $k, $v, 'expr_type');
224
            }
225
226
            $sql .= ',';
227
        }
228
        $sql = substr($sql, 0, -1);
229
230
        return '('.$sql.')';
@@ 517-528 (lines=12) @@
514
        }
515
516
        $sql = '';
517
        foreach ($parsed as $k => $v) {
518
            $len = strlen($sql);
519
            $sql .= $this->processColRef($v);
520
            $sql .= $this->processOperator($v);
521
            $sql .= $this->processConstant($v);
522
523
            if ($len == strlen($sql)) {
524
                throw new UnableToCreateSQLException('expression ref_clause', $k, $v, 'expr_type');
525
            }
526
527
            $sql .= ' ';
528
        }
529
530
        return '('.substr($sql, 0, -1).')';
531
    }