Test Failed
Pull Request — master (#176)
by
unknown
02:35
created

Remove   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 38
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fire() 0 4 1
A getArguments() 0 6 1
1
<?php
2
3
namespace PragmaRX\Firewall\Vendor\Laravel\Artisan;
4
5
use Symfony\Component\Console\Input\InputArgument;
6
7
class Remove extends Base
8
{
9
    /**
10
     * The console command name.
11
     *
12
     * @var string
13
     */
14
    protected $name = 'firewall:remove';
15
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Remove an IP address from white or black list.';
22
23
    /**
24
     * Remove an ip from a list.
25
     *
26
     * @return mixed
27
     */
28
    public function fire()
29
    {
30
        $this->fireCommand('remove', [$this->argument('ip')]);
31
    }
32
33
    /**
34
     * Get the console command arguments.
35
     *
36
     * @return array
37
     */
38
    protected function getArguments()
39
    {
40
        return [
41
            ['ip', InputArgument::REQUIRED, 'The IP address to be added.'],
42
        ];
43
    }
44
}
45