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

PasswordTokenClearCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
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 PasswordTokenClearCommand extends Command
21
{
22
    /**
23
     * The name and signature of the console command.
24
     *
25
     * @var string
26
     */
27
    protected $signature = 'fort:reset:clear {broker? : The name of the password broker}';
28
29
    /**
30
     * The console command description.
31
     *
32
     * @var string
33
     */
34
    protected $description = 'Flush expired password reset tokens';
35
36
    /**
37
     * Execute the console command.
38
     *
39
     * @return void
40
     */
41
    public function handle()
42
    {
43
        $this->laravel['rinvex.fort.resetter']->broker($this->argument('broker'))->getTokenRepository()->deleteExpired();
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 121 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
44
45
        $this->info('Expired reset tokens cleared!');
46
    }
47
}
48