@@ -64,7 +64,7 @@ protected function getFilePathsMatchingPattern($pattern, $absolute = false): arr
64
64
{
65
65
$ files = [];
66
66
67
- if (!$ absolute ) {
67
+ if (! $ absolute ) {
68
68
$ scannedFiles = $ this ->getFilesystem ()->allFiles ($ this ->basePathForLogs ());
69
69
} else {
70
70
$ pathInfo = pathinfo ($ pattern );
@@ -74,11 +74,10 @@ protected function getFilePathsMatchingPattern($pattern, $absolute = false): arr
74
74
$ scannedFiles = $ this ->getFilesystem ($ dirname )->allFiles ();
75
75
}
76
76
77
- foreach ($ scannedFiles as $ file )
78
- {
77
+ foreach ($ scannedFiles as $ file ) {
79
78
if (preg_match (pattern: Glob::toRegex (glob: $ pattern ), subject: $ file )) {
80
79
$ files [] = isset ($ dirname )
81
- ? $ dirname . DIRECTORY_SEPARATOR . $ file
80
+ ? $ dirname. DIRECTORY_SEPARATOR . $ file
82
81
: $ file ;
83
82
}
84
83
}
@@ -89,6 +88,7 @@ protected function getFilePathsMatchingPattern($pattern, $absolute = false): arr
89
88
public function basePathForLogs (): string
90
89
{
91
90
$ rootFolder = Str::of (config ('log-viewer.filesystem.root ' ));
91
+
92
92
return empty ($ rootFolder )
93
93
? $ rootFolder ->finish ('/ ' )
94
94
: $ rootFolder ;
@@ -171,7 +171,7 @@ public function getRouteMiddleware(): array
171
171
172
172
public function getFilesystem ($ absolutePath = '' ): Filesystem
173
173
{
174
- if (!config ('disable_absolute_filepaths ' ) && ($ absolutePath !== '' ) && is_dir ($ absolutePath )) {
174
+ if (! config ('disable_absolute_filepaths ' ) && ($ absolutePath !== '' ) && is_dir ($ absolutePath )) {
175
175
config ()->set ('filesystems.disks.log-viewer-absolute ' , [
176
176
'driver ' => 'local ' ,
177
177
'root ' => $ absolutePath ,
0 commit comments