InstallCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 20 2
1
<?php
2
3
namespace Bencoderus\Webhook\Console;
4
5
use Illuminate\Console\Command;
6
7
class InstallCommand extends Command
8
{
9
    protected $signature = 'webhook:install';
10
11
    protected $description = 'Install Webhook Dependencies';
12
13
    public function handle()
14
    {
15
        $this->info('Installing the webhook service');
16
17
        $this->info('Publishing configuration...');
18
19
        $this->call('vendor:publish', [
20
            '--provider' => "Bencoderus\Webhook\WebhookServiceProvider",
21
            '--tag' => 'config',
22
        ]);
23
24
        if (! class_exists('CreateWebhookLogsTable')) {
25
            $this->call('vendor:publish', [
26
                '--provider' => "Bencoderus\Webhook\WebhookServiceProvider",
27
                '--tag' => 'migrations',
28
            ]);
29
        }
30
31
        $this->info('Webhook service installed successfully.');
32
    }
33
}
34