Code Duplication    Length = 3-4 lines in 4 locations

src/SQLParser/Node/WhenConditions.php 1 location

@@ 47-49 (lines=3) @@
44
    {
45
        $fullSql = '';
46
47
        if ($this->value) {
48
            $fullSql = NodeFactory::toSql($this->value, $dbConnection, $parameters, ' ', false, $indent, $conditionsMode);
49
        }
50
51
        foreach ($this->getOperands() as $operand) {
52
            $sql = NodeFactory::toSql($operand, $dbConnection, $parameters, ' ', false, $indent, $conditionsMode);

src/SQLParser/Query/Select.php 1 location

@@ 334-336 (lines=3) @@
331
            $sql .= implode(' ', $this->options)."\n";
332
        }
333
334
        if (!empty($this->columns)) {
335
            $sql .= NodeFactory::toSql($this->columns, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
336
        }
337
338
        if (!empty($this->from)) {
339
            $from = NodeFactory::toSql($this->from, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);

src/SQLParser/Node/Table.php 1 location

@@ 208-211 (lines=4) @@
205
        if ($this->alias) {
206
            $sql .= ' AS '.NodeFactory::escapeDBItem($this->alias, $dbConnection);
207
        }
208
        if ($this->refClause) {
209
            $sql .= ' ON ';
210
            $sql .= NodeFactory::toSql($this->refClause, $dbConnection, $parameters, ' ', true, $indent, $conditionsMode);
211
        }
212
213
        return $sql;
214
    }

src/SQLParser/Node/SubQuery.php 1 location

@@ 200-203 (lines=4) @@
197
        if ($this->alias) {
198
            $sql .= ' AS '.NodeFactory::escapeDBItem($this->alias, $dbConnection);
199
        }
200
        if ($this->refClause) {
201
            $sql .= ' ON ';
202
            $sql .= NodeFactory::toSql($this->refClause, $dbConnection, $parameters, ' ', true, $indent, $conditionsMode);
203
        }
204
205
        return $sql;
206
    }