Code Duplication    Length = 17-18 lines in 2 locations

src/database/seeds/BantenprovPrestasiSeederMasterPrestasi.php 1 location

@@ 91-108 (lines=18) @@
88
        printf($this->GRN.$text.$this->NC);
89
    }
90
    /* function read CSV file */
91
    protected function readCSV()
92
    {
93
        $file = fopen(database_path("seeds/".$this->fileName), "r");
94
        $all_data = array();
95
        $row = 1;
96
        while(($data = fgetcsv($file, 1000, ",")) !== FALSE){
97
            $all_data[] = [
98
                'jenis_prestasi_id' => $data[0],
99
                'juara' => $data[1],
100
                'tingkat' => $data[2],
101
                'nilai' => $data[3],
102
                'kode' => $data[4],
103
                'user_id' => $data[5],
104
            ];
105
        }
106
        fclose($file);
107
        return  $all_data;
108
    }
109
}
110

src/database/seeds/BantenprovPrestasiSeederPrestasi.php 1 location

@@ 88-104 (lines=17) @@
85
        printf($this->GRN.$text.$this->NC);
86
    }
87
    /* function read CSV file */
88
    protected function readCSV()
89
    {
90
        $file = fopen(database_path("seeds/".$this->fileName), "r");
91
        $all_data = array();
92
        $row = 1;
93
        while(($data = fgetcsv($file, 1000, ",")) !== FALSE){
94
            $all_data[] = [
95
                'nomor_un' => $data[0],
96
                'master_prestasi_id' => $data[1],
97
                'nama_lomba' => $data[2],
98
                'nilai' => $data[3],
99
                'user_id' => $data[4],
100
            ];
101
        }
102
        fclose($file);
103
        return  $all_data;
104
    }
105
}
106