Code Duplication    Length = 5-5 lines in 2 locations

app/Http/Controllers/FileLinks/GuestLinksController.php 2 locations

@@ 43-47 (lines=5) @@
40
            return view('links.guestBadLink');
41
        }
42
        //  Verify that the link has not expired
43
        else if($details->expire <= date('Y-m-d'))
44
        {
45
            Log::warning('Visitor '.\Request::ip().' visited expired link Hash - '.$id);
46
            return view('links.guestExpiredLink');
47
        }
48
49
        //  Link is valid - determine if the link has files that can be downloaded
50
        $files = FileLinkFiles::where('link_id', $details->link_id)
@@ 54-58 (lines=5) @@
51
            ->where('upload', false)
52
            ->count();
53
54
        if($files == 0 && $details->allow_upload === 'No')
55
        {
56
            Log::warning('Visitor '.\Request::ip().' visited a link that they cannot do anything with.  Hash - '.$id);
57
            return view('links.guestDeadLink');
58
        }
59
60
        return view('links.guestDetails', [
61
            'hash'    => $id,