Code Duplication    Length = 12-12 lines in 2 locations

src/database/Postgres.php 2 locations

@@ 9126-9137 (lines=12) @@
9123
                                                        }
9124
9125
                                                        // Check for COPY request
9126
                                                        if (pg_result_status($res) == 4) {
9127
                                                            // 4 == PGSQL_COPY_FROM
9128
                                                            while (!feof($fd)) {
9129
                                                                $copy = fgets($fd, 32768);
9130
                                                                $lineno++;
9131
                                                                pg_put_line($conn, $copy);
9132
                                                                if ($copy == "\\.\n" || $copy == "\\.\r\n") {
9133
                                                                    pg_end_copy($conn);
9134
                                                                    break;
9135
                                                                }
9136
                                                            }
9137
                                                        }
9138
                                                    }
9139
                                                    $query_buf = null;
9140
                                                    $query_start = $i + $thislen;
@@ 9200-9211 (lines=12) @@
9197
            }
9198
9199
            // Check for COPY request
9200
            if (pg_result_status($res) == 4) {
9201
                // 4 == PGSQL_COPY_FROM
9202
                while (!feof($fd)) {
9203
                    $copy = fgets($fd, 32768);
9204
                    $lineno++;
9205
                    pg_put_line($conn, $copy);
9206
                    if ($copy == "\\.\n" || $copy == "\\.\r\n") {
9207
                        pg_end_copy($conn);
9208
                        break;
9209
                    }
9210
                }
9211
            }
9212
        }
9213
9214
        fclose($fd);