Code Duplication    Length = 18-29 lines in 2 locations

src/app/models/contest_model.php 2 locations

@@ 244-261 (lines=18) @@
241
        return $this->is_registered('webdev_registrations', $user_nick);
242
    }
243
244
    public function register_for_webdev($info) {
245
        return $this->db_lib->prepared_execute(
246
            $this->DB->contest,
247
            "INSERT INTO `webdev_registrations`
248
            (`nick`, `contact_number`, `stream`, `year`, `experience`, `why_join`)
249
            VALUES  (?, ?, ?, ?, ?, ?)",
250
            "ssssss",
251
            [
252
                $info['nick'],
253
                $info['contact_number'],
254
                $info['stream'],
255
                $info['year'],
256
                $info['experience'],
257
                $info['why_join'],
258
            ],
259
            false
260
        );
261
    }
262
263
    public function webdev_payment_success($payment_id, $nick, $status, $payment_data) {
264
        $stmt = $this->db_lib->prepared_execute(
@@ 302-330 (lines=29) @@
299
        return $this->is_registered('riderofstorms_registrations', $user_nick);
300
    }
301
302
    public function register_for_riderofstorms($info) {
303
        /*$user_details = [
304
            'nick'              => $info['nick'],
305
            'contact_number'    => $info['contact_number'],
306
            'name'              => $info['name'],
307
            'leader'            => $info['leader'],
308
            'members'           => $info['members'],
309
            'link'              => $info['link'],
310
            'tell'              => $info['tell']
311
        ];*/
312
313
        return $this->db_lib->prepared_execute(
314
            $this->DB->contest,
315
            "INSERT INTO `riderofstorms_registrations`
316
            (`nick`, `name`, `contact_number`, `leader`, `link`, `members`, `tell`)
317
            VALUES  (?, ?, ?, ?, ?, ?, ?)",
318
            "sssssss",
319
            [
320
              $info['nick'],
321
              $info['name'],
322
              $info['contact_number'],
323
              $info['leader'],
324
              $info['link'],
325
              $info['members'],
326
              $info['tell']
327
            ],
328
            false
329
        );
330
    }
331
332
    public function riderofstorms_payment_success($payment_id, $nick, $status, $payment_data) {
333
        $stmt = $this->db_lib->prepared_execute(