IproPullDatabaseCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 19
dl 0
loc 35
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 27 1
1
<?php
2
3
namespace IproSync\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Artisan;
7
8
class IproPullDatabaseCommand extends Command
9
{
10
    protected $signature = 'iprosoftware-sync:database:pull
11
     {--queue= : Queue to dispatch job.}
12
     ';
13
14
    protected $description = 'Pull ipro fully data';
15
16
    public function handle(): int
17
    {
18
        $queue = $this->option('queue');
19
20
        Artisan::call('iprosoftware-sync:settings:pull', array_filter([
21
            '--queue' => $queue,
22
        ]));
23
        Artisan::call('iprosoftware-sync:contacts:pull', array_filter([
24
            '--queue' => $queue,
25
        ]));
26
        Artisan::call('iprosoftware-sync:properties:pull', array_filter([
27
            '--queue' => $queue,
28
        ]));
29
        Artisan::call('iprosoftware-sync:properties-custom-rates:pull', array_filter([
30
            '--queue' => $queue,
31
        ]));
32
        Artisan::call('iprosoftware-sync:availability:pull', array_filter([
33
            '--queue' => $queue,
34
        ]));
35
        Artisan::call('iprosoftware-sync:blockouts:pull', array_filter([
36
            '--queue' => $queue,
37
        ]));
38
        Artisan::call('iprosoftware-sync:bookings:pull', array_filter([
39
            '--queue' => $queue,
40
        ]));
41
42
        return 0;
43
    }
44
}
45