Code Duplication    Length = 16-16 lines in 2 locations

app/Http/Controllers/ApplicationByJobController.php 1 location

@@ 425-440 (lines=16) @@
422
        ]);
423
424
        // Save new degrees.
425
        if (isset($degrees['new'])) {
426
            foreach ($degrees['new'] as $degreeInput) {
427
                $degree = new Degree();
428
                $degree->applicant_id = $applicant->id;
429
                $degree->fill([
430
                    'degree_type_id' => $degreeInput['degree_type_id'],
431
                    'area_of_study' => $degreeInput['area_of_study'],
432
                    'institution' => $degreeInput['institution'],
433
                    'thesis' => $degreeInput['thesis'],
434
                    'start_date' => $degreeInput['start_date'],
435
                    'end_date' => $degreeInput['end_date'],
436
                    'blockcert_url' => $degreeInput['blockcert_url'],
437
                ]);
438
                $degree->save();
439
            }
440
        }
441
442
        // Update old degrees.
443
        if (isset($degrees['old'])) {

app/Http/Controllers/ExperienceController.php 1 location

@@ 80-95 (lines=16) @@
77
        }
78
79
        // Save new degrees.
80
        if (isset($degrees['new'])) {
81
            foreach ($degrees['new'] as $degreeInput) {
82
                $degree = new Degree();
83
                $degree->applicant_id = $applicant->id;
84
                $degree->fill([
85
                    'degree_type_id' => $degreeInput['degree_type_id'],
86
                    'area_of_study' => $degreeInput['area_of_study'],
87
                    'institution' => $degreeInput['institution'],
88
                    'thesis' => $degreeInput['thesis'],
89
                    'start_date' => $degreeInput['start_date'],
90
                    'end_date' => $degreeInput['end_date'],
91
                    'blockcert_url' => $degreeInput['blockcert_url'],
92
                ]);
93
                $degree->save();
94
            }
95
        }
96
97
        // Update old degrees.
98
        if (isset($degrees['old'])) {