Code Duplication    Length = 6-8 lines in 2 locations

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php 2 locations

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