Code Duplication    Length = 6-8 lines in 2 locations

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php 2 locations

@@ 62-69 (lines=8) @@
59
            $this->folder = $folder;
60
        }
61
        if(is_array($this->storage_path)){
62
            foreach ($this->storage_path as $value) {
63
                $logsPath = $value . '/' . $folder;
64
                if (app('files')->exists($logsPath)) {
65
                    $this->folder = $folder;
66
                    break;
67
                }
68
            }
69
        }
70
    }
71
72
    /**
@@ 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