PublishCommand::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 17
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 27
rs 9.7
1
<?php
2
3
namespace Mydnic\Kustomer\Console;
4
5
use Illuminate\Support\Str;
6
use Illuminate\Console\Command;
7
8
class PublishCommand extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'kustomer:publish {--force : Overwrite any existing files}';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Publish all of the Kustomer Feedback resources';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return void
28
     */
29
    public function handle()
30
    {
31
        $this->comment('Publishing Kustomer Assets...');
32
        $this->call('vendor:publish', [
33
            '--tag' => 'kustomer-assets',
34
            '--force' => $this->option('force'),
35
        ]);
36
37
        $this->comment('Publishing Kustomer Configuration...');
38
        $this->call('vendor:publish', [
39
            '--tag' => 'kustomer-config',
40
            '--force' => $this->option('force'),
41
        ]);
42
43
        $this->comment('Publishing Kustomer Translation Files...');
44
        $this->call('vendor:publish', [
45
            '--tag' => 'kustomer-locales',
46
            '--force' => $this->option('force'),
47
        ]);
48
49
        $this->comment('Publishing Kustomer View Files...');
50
        $this->call('vendor:publish', [
51
            '--tag' => 'kustomer-views',
52
            '--force' => $this->option('force'),
53
        ]);
54
55
        $this->info('Kustomer scaffolding installed successfully.');
56
    }
57
}
58