Completed
Push — master ( 78679a...aac6ad )
by Freek
11s
created

ClearCachedEventHandlersCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\EventProjector\Console;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Filesystem\Filesystem;
7
8
final class ClearCachedEventHandlersCommand extends Command
9
{
10
    protected $signature = 'event-projector:clear-event-handlers';
11
12
    protected $description = 'Clear cached event handlers';
13
14
    public function handle(Filesystem $files): void
15
    {
16
        $files->delete(config('event-projector.cache_path').'/event-handlers.php');
17
18
        $this->info('Cached event handlers cleared!');
19
    }
20
}
21