Passed
Push — master ( 33dd6a...79a2dd )
by
unknown
05:18 queued 03:21
created
src/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::group(['prefix' => config('logreader.prefix', 'logreader'), 'middleware' => config('logreader.middleware', 'auth')], function () {
3
+Route::group(['prefix' => config('logreader.prefix', 'logreader'), 'middleware' => config('logreader.middleware', 'auth')], function() {
4 4
     Route::get('/', 'Cion\LaravelLogReader\Reader\LogReaderController@index');
5 5
 });
Please login to merge, or discard this patch.
src/Reader/LogReader.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $this->setTime();
30 30
 
31
-        $this->getLogFiles()->each(function ($file) {
32
-            $this->getFileLogSections($file)->each(function ($line) {
31
+        $this->getLogFiles()->each(function($file) {
32
+            $this->getFileLogSections($file)->each(function($line) {
33 33
                 $this->handleFileLine($line);
34 34
             });
35 35
         });
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $sectionReader = (new LogSectionReader($section))->read();
43 43
 
44
-        if (! empty($sectionReader->toArray())) {
44
+        if (!empty($sectionReader->toArray())) {
45 45
             $this->loggers[] = $sectionReader->toArray();
46 46
         }
47 47
     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function getLogFiles() : Collection
60 60
     {
61
-        if (! $this->filesystem->exists($this->getPath())) {
61
+        if (!$this->filesystem->exists($this->getPath())) {
62 62
             throw new FolderNotFoundException();
63 63
         }
64 64
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function getFiles() : Collection
69 69
     {
70
-        return collect($this->files)->filter(function ($file) {
70
+        return collect($this->files)->filter(function($file) {
71 71
             if ($this->hasTime()) {
72 72
                 return $file->getFilename() === "laravel-{$this->getTime()}.log";
73 73
             }
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function getSubDirectoriesFiles() : self
80 80
     {
81
-        collect($this->filesystem->directories($this->getPath()))->map(function ($directory) {
82
-            collect($this->filesystem->files($directory))->filter(function ($file) {
81
+        collect($this->filesystem->directories($this->getPath()))->map(function($directory) {
82
+            collect($this->filesystem->files($directory))->filter(function($file) {
83 83
                 $this->files[] = $file;
84 84
             });
85 85
         });
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function getDiretoryFiles() : self
91 91
     {
92
-        collect($this->filesystem->files($this->getPath()))->filter(function ($file) {
92
+        collect($this->filesystem->files($this->getPath()))->filter(function($file) {
93 93
             $this->files[] = $file;
94 94
         });
95 95
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $sections = collect();
161 161
 
162
-        collect(explode("\n", $content))->each(function ($line) use (&$sections) {
162
+        collect(explode("\n", $content))->each(function($line) use (&$sections) {
163 163
             if ((new LineHelper($line))->hasDate()) {
164 164
                 $sections->push([
165 165
                     'line' => $line,
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     {
178 178
         $size = count($sections);
179 179
 
180
-        return $sections->map(function ($value, $key) use ($size, $line) {
180
+        return $sections->map(function($value, $key) use ($size, $line) {
181 181
             if ($size - 1 === $key) {
182 182
                 $value['extra'][] = $line;
183 183
             }
Please login to merge, or discard this patch.
src/Reader/LogSectionReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,14 +86,14 @@
 block discarded – undo
86 86
         $this->extra->pop();
87 87
         $this->extra->pop();
88 88
 
89
-        $this->extra = $this->extra->map(function ($extra) {
89
+        $this->extra = $this->extra->map(function($extra) {
90 90
             return explode(': ', substr($extra, 3));
91 91
         });
92 92
     }
93 93
 
94 94
     public function toArray() : array
95 95
     {
96
-        if (! $this->date || ! $this->type || ! $this->message || ! $this->extra) {
96
+        if (!$this->date || !$this->type || !$this->message || !$this->extra) {
97 97
             return [];
98 98
         }
99 99
 
Please login to merge, or discard this patch.