Publish   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 15 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GeneaLabs\LaravelMessenger\Console\Commands;
6
7
use Illuminate\Console\Command;
8
use GeneaLabs\LaravelMessenger\Providers\Service;
9
10
class Publish extends Command
11
{
12
    protected $signature = 'messenger:publish {--config} {--views}';
13
    protected $description = 'Publish configuration file of the Laravel Messenger package.';
14
15
    public function handle()
16
    {
17
        if ($this->option('config')) {
18
            $this->call('vendor:publish', [
19
                '--provider' => Service::class,
20
                '--tag' => ['config'],
21
                '--force' => true,
22
            ]);
23
        }
24
25
        if ($this->option('views')) {
26
            $this->call('vendor:publish', [
27
                '--provider' => Service::class,
28
                '--tag' => ['views'],
29
                '--force' => true,
30
            ]);
31
        }
32
    }
33
}
34