Code Duplication    Length = 6-8 lines in 2 locations

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php 2 locations

@@ 96-101 (lines=6) @@
93
            return $file;
94
        }
95
        if (is_array($this->storage_path)) {
96
            foreach ($this->storage_path as $folder) {
97
                if (app('files')->exists($folder . '/' . $file)) { // try the absolute path
98
                    $file = $folder . '/' . $file;
99
                    break;
100
                }
101
            }
102
            return $file;
103
        }
104
@@ 61-68 (lines=8) @@
58
            $this->folder = $folder;
59
        }
60
        if(is_array($this->storage_path)){
61
            foreach ($this->storage_path as $value) {
62
                $logsPath = $value . '/' . $folder;
63
                if (app('files')->exists($logsPath)) {
64
                    $this->folder = $folder;
65
                    break;
66
                }
67
            }
68
        }
69
    }
70
71
    /**