Completed
Push — master ( 36858c...6c23f8 )
by Abdelrahman
07:21
created

VerificationTokenClearCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
/*
4
 * NOTICE OF LICENSE
5
 *
6
 * Part of the Rinvex Fort Package.
7
 *
8
 * This source file is subject to The MIT License (MIT)
9
 * that is bundled with this package in the LICENSE file.
10
 *
11
 * Package: Rinvex Fort Package
12
 * License: The MIT License (MIT)
13
 * Link:    https://rinvex.com
14
 */
15
16
namespace Rinvex\Fort\Console\Commands;
17
18
use Illuminate\Console\Command;
19
20
class VerificationTokenClearCommand extends Command
21
{
22
    /**
23
     * The name and signature of the console command.
24
     *
25
     * @var string
26
     */
27
    protected $signature = 'fort:verify:clear {broker? : The name of the verification broker}';
28
29
    /**
30
     * The console command description.
31
     *
32
     * @var string
33
     */
34
    protected $description = 'Flush expired verification tokens';
35
36
    /**
37
     * Execute the console command.
38
     *
39
     * @return void
40
     */
41
    public function handle()
42
    {
43
        app('rinvex.fort.verifier')->broker($this->argument('broker'))->getTokenRepository()->deleteExpired();
44
45
        $this->info('Expired verification tokens cleared!');
46
    }
47
}
48