Code Duplication    Length = 6-6 lines in 2 locations

src/Traits/ReceivesApplications.php 2 locations

@@ 26-31 (lines=6) @@
23
24
        $query = Application::query();
25
26
        if (is_array($model)) {
27
            $query->where('type', $model['type'] ?? $applicationType)
28
                ->where('status', $model['status'] ?? $applicationStatus)
29
                ->where('applicant_id', $model['applicant_id'])
30
                ->where('applicant_type', $model['applicant_type']);
31
        }
32
33
        if (is_object($model)) {
34
            $query->where('type', $applicationType)
@@ 75-80 (lines=6) @@
72
73
        $query = $this->receivedApplications();
74
75
        if (is_array($model)) {
76
            $query->where('type', $model['type'] ?? $applicationType)
77
                ->where('status', $model['status'] ?? $applicationStatus)
78
                ->where('applicant_id', $model['applicant_id'])
79
                ->where('applicant_type', $model['applicant_type']);
80
        }
81
82
        if (is_object($model)) {
83
            $query->where('type', $applicationType)