@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Cion\LaravelLogReader\Reader\LogReader; |
4 | 4 | |
5 | -Route::group(['prefix' => config('logreader.prefix')], function () { |
|
5 | +Route::group(['prefix' => config('logreader.prefix')], function() { |
|
6 | 6 | Route::get('/', 'Cion\LaravelLogReader\Reader\LogReaderController@index'); |
7 | 7 | }); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | |
60 | 60 | public function hasAtLeastOneLoggerType() |
61 | 61 | { |
62 | - return collect($this->types)->filter(function ($type) { |
|
62 | + return collect($this->types)->filter(function($type) { |
|
63 | 63 | if ($this->hasLoggerType($type)) { |
64 | 64 | return true; |
65 | 65 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | |
25 | 25 | public function read() |
26 | 26 | { |
27 | - $this->get()->each(function ($file) { |
|
28 | - $this->getFileLines($file)->each(function ($line) { |
|
27 | + $this->get()->each(function($file) { |
|
28 | + $this->getFileLines($file)->each(function($line) { |
|
29 | 29 | if ($lineHandler = (new LineReader($line))->handle()) { |
30 | 30 | $this->loggers[] = $lineHandler->getArray(); |
31 | 31 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function get() |
49 | 49 | { |
50 | 50 | // TODO:Add Expection if this path doesn't exists |
51 | - if (! $this->filesystem->exists(config('logreader.path'))) { |
|
51 | + if (!$this->filesystem->exists(config('logreader.path'))) { |
|
52 | 52 | throw new FolderNotFoundException(); |
53 | 53 | // throw new Exception("File Does Not Exists"); |
54 | 54 | } |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | |
59 | 59 | public function getFiles() |
60 | 60 | { |
61 | - return collect($this->files)->filter(function ($file) { |
|
62 | - if (! is_null($this->getTime())) { |
|
61 | + return collect($this->files)->filter(function($file) { |
|
62 | + if (!is_null($this->getTime())) { |
|
63 | 63 | // Get only the files that has the current time |
64 | 64 | return $file->getFilename() === "laravel-{$this->getTime()}.log"; |
65 | 65 | } |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | |
71 | 71 | public function getSubDirectoriesFiles() |
72 | 72 | { |
73 | - collect($this->filesystem->directories(config('logreader.path')))->map(function ($directory) { |
|
74 | - collect($this->filesystem->files($directory))->filter(function ($file) { |
|
73 | + collect($this->filesystem->directories(config('logreader.path')))->map(function($directory) { |
|
74 | + collect($this->filesystem->files($directory))->filter(function($file) { |
|
75 | 75 | $this->files[] = $file; |
76 | 76 | }); |
77 | 77 | }); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | public function getDiretoryFiles() |
83 | 83 | { |
84 | - collect($this->filesystem->files(config('logreader.path')))->filter(function ($file) { |
|
84 | + collect($this->filesystem->files(config('logreader.path')))->filter(function($file) { |
|
85 | 85 | $this->files[] = $file; |
86 | 86 | }); |
87 | 87 |