Passed
Push — master ( 8f3742...50f570 )
by Darko
08:41
created

NntmuxPurgeDeletedAccounts::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Jobs\PurgeDeletedAccounts;
6
use Illuminate\Console\Command;
7
8
class NntmuxPurgeDeletedAccounts extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'nntmux:purge-deleted-accounts';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Permanently remove accounts that were soft deleted 6 months ago';
23
24
    /**
25
     * Execute the console command.
26
     */
27
    public function handle(): int
28
    {
29
        $this->info('Starting to purge accounts that were soft deleted 6 months ago...');
30
31
        PurgeDeletedAccounts::dispatch();
32
33
        $this->info('Job dispatched to purge deleted accounts');
34
35
        return Command::SUCCESS;
36
    }
37
}
38