PublishCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 9
c 1
b 1
f 0
dl 0
loc 32
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 1
1
<?php
2
3
namespace Thinkstudeo\Rakshak\Console;
4
5
use Illuminate\Console\Command;
6
7
class PublishCommand extends Command
8
{
9
    /**
10
     * Signature to be used for calling the command from the cli, along with arguments and options.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'rakshak:publish {--force : Overwrite any existing files}';
15
16
    /**
17
     * Describe what the command does.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Publish all Rakshak views and config.';
22
23
    /**
24
     * Handle the execution logic for the command.
25
     * Publish the config and views of Rakshak.
26
     *
27
     * @return void
28
     */
29
    public function handle(): void
30
    {
31
        $this->call('vendor:publish', [
32
            '--tag'   => 'config',
33
            '--force' => $this->option('force'),
34
        ]);
35
36
        $this->call('vendor:publish', [
37
            '--tag'   => 'views',
38
            '--force' => $this->option('force'),
39
        ]);
40
    }
41
}
42