Code Duplication    Length = 6-6 lines in 6 locations

src/SQLParser/Query/Select.php 6 locations

@@ 316-321 (lines=6) @@
313
            $sql .= NodeFactory::toSql($this->columns, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
314
        }
315
316
        if (!empty($this->from)) {
317
            $from = NodeFactory::toSql($this->from, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
318
            if ($from) {
319
                $sql .= "\nFROM ".$from;
320
            }
321
        }
322
323
        if (!empty($this->where)) {
324
            $where = NodeFactory::toSql($this->where, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
@@ 323-328 (lines=6) @@
320
            }
321
        }
322
323
        if (!empty($this->where)) {
324
            $where = NodeFactory::toSql($this->where, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
325
            if ($where) {
326
                $sql .= "\nWHERE ".$where;
327
            }
328
        }
329
330
        if (!empty($this->group)) {
331
            $groupBy = NodeFactory::toSql($this->group, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
@@ 330-335 (lines=6) @@
327
            }
328
        }
329
330
        if (!empty($this->group)) {
331
            $groupBy = NodeFactory::toSql($this->group, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
332
            if ($groupBy) {
333
                $sql .= "\nGROUP BY ".$groupBy;
334
            }
335
        }
336
337
        if (!empty($this->having)) {
338
            $having = NodeFactory::toSql($this->having, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
@@ 337-342 (lines=6) @@
334
            }
335
        }
336
337
        if (!empty($this->having)) {
338
            $having = NodeFactory::toSql($this->having, $dbConnection, $parameters, ' ', false, $indent + 2, $conditionsMode);
339
            if ($having) {
340
                $sql .= "\nHAVING ".$having;
341
            }
342
        }
343
344
        if (!empty($this->order)) {
345
            $order = NodeFactory::toSql($this->order, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
@@ 344-349 (lines=6) @@
341
            }
342
        }
343
344
        if (!empty($this->order)) {
345
            $order = NodeFactory::toSql($this->order, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
346
            if ($order) {
347
                $sql .= "\nORDER BY ".$order;
348
            }
349
        }
350
351
        if (!empty($this->limit)) {
352
            $limit = NodeFactory::toSql($this->limit, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
@@ 351-356 (lines=6) @@
348
            }
349
        }
350
351
        if (!empty($this->limit)) {
352
            $limit = NodeFactory::toSql($this->limit, $dbConnection, $parameters, ',', false, $indent + 2, $conditionsMode);
353
            if ($limit) {
354
                $sql .= "\nLIMIT ".$limit;
355
            }
356
        }
357
358
        return $sql;
359
    }