Completed
Pull Request — master (#1168)
by
unknown
10:00
created

ClearModulesCacheCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nwidart\Modules\Commands;
4
5
use Illuminate\Console\Command;
6
use Nwidart\Modules\Traits\CanClearModulesCache;
7
8
class ClearModulesCacheCommand extends Command
9
{
10
    use CanClearModulesCache;
11
12
    /**
13
     * The name and signature of the console command.
14
     *
15
     * @var string
16
     */
17
    protected $signature = 'module:clear-cache {--force}';
18
19
    /**
20
     * The console command description.
21
     *
22
     * @var string
23
     */
24
    protected $description = 'Clear the modules cache';
25
26
    /**
27
     * Execute the console command.
28
     *
29
     * @return mixed
30
     */
31
    public function handle()
32
    {
33
        $force = $this->option('force');
34
        $this->clearCache($force);
35
        $this->info('The modules cache has been cleared.');
36
        return 0;
37
    }
38
}
39