Passed
Push — master ( 6bfad1...b9baef )
by Antonio Carlos
03:31
created

UpdateGeoIp   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 28
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fire() 0 7 2
1
<?php
2
3
namespace PragmaRX\Firewall\Vendor\Laravel\Artisan;
4
5
class UpdateGeoIp extends Base
6
{
7
    /**
8
     * The console command name.
9
     *
10
     * @var string
11
     */
12
    protected $name = 'firewall:updategeoip';
13
14
    /**
15
     * The console command description.
16
     *
17
     * @var string
18
     */
19
    protected $description = 'Update the GeoIP database.';
20
21
    /**
22
     * Execute the console command.
23
     *
24
     * @return mixed
25
     */
26
    public function fire()
27
    {
28
        $type = $this->laravel->firewall->updateGeoIp()
0 ignored issues
show
Bug introduced by
Accessing firewall on the interface Illuminate\Contracts\Foundation\Application suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
29
            ? 'info'
30
            : 'error';
31
32
        $this->displayMessages($type, $this->laravel->firewall->getMessages());
33
    }
34
}
35