Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
37 | public function handle() |
||
38 | { |
||
39 | $filesystem = app(Filesystem::class); |
||
40 | |||
41 | $logFiles = $filesystem->glob(storage_path('logs/*.log')); |
||
42 | |||
43 | foreach ($logFiles as $file) { |
||
44 | $status = $filesystem->delete($file); |
||
45 | if ($status) { |
||
46 | $this->info('Successfully deleted: ' . $file); |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 | |||
52 |