Code Duplication    Length = 12-12 lines in 2 locations

src/database/Postgres.php 2 locations

@@ 8922-8933 (lines=12) @@
8919
                                                        }
8920
8921
                                                        // Check for COPY request
8922
                                                        if (pg_result_status($res) == 4) {
8923
                                                            // 4 == PGSQL_COPY_FROM
8924
                                                            while (!feof($fd)) {
8925
                                                                $copy = fgets($fd, 32768);
8926
                                                                $lineno++;
8927
                                                                pg_put_line($conn, $copy);
8928
                                                                if ($copy == "\\.\n" || $copy == "\\.\r\n") {
8929
                                                                    pg_end_copy($conn);
8930
                                                                    break;
8931
                                                                }
8932
                                                            }
8933
                                                        }
8934
                                                    }
8935
                                                    $query_buf   = null;
8936
                                                    $query_start = $i + $thislen;
@@ 8996-9007 (lines=12) @@
8993
            }
8994
8995
            // Check for COPY request
8996
            if (pg_result_status($res) == 4) {
8997
                // 4 == PGSQL_COPY_FROM
8998
                while (!feof($fd)) {
8999
                    $copy = fgets($fd, 32768);
9000
                    $lineno++;
9001
                    pg_put_line($conn, $copy);
9002
                    if ($copy == "\\.\n" || $copy == "\\.\r\n") {
9003
                        pg_end_copy($conn);
9004
                        break;
9005
                    }
9006
                }
9007
            }
9008
        }
9009
9010
        fclose($fd);