Code Duplication    Length = 6-8 lines in 2 locations

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php 2 locations

@@ 66-73 (lines=8) @@
63
            $this->folder = $folder;
64
        }
65
        if(is_array($this->storage_path)) {
66
            foreach ($this->storage_path as $value) {
67
                $logsPath = $value . '/' . $folder;
68
                if (app('files')->exists($logsPath)) {
69
                    $this->folder = $folder;
70
                    break;
71
                }
72
            }
73
        } else {
74
            if ($this->storage_path) {
75
                $logsPath = $this->storage_path . '/' . $folder;
76
                if (app('files')->exists($logsPath)) {
@@ 108-113 (lines=6) @@
105
            return $file;
106
        }
107
        if (is_array($this->storage_path)) {
108
            foreach ($this->storage_path as $folder) {
109
                if (app('files')->exists($folder . '/' . $file)) { // try the absolute path
110
                    $file = $folder . '/' . $file;
111
                    break;
112
                }
113
            }
114
            return $file;
115
        }
116