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

UpdateGeoIp::fire()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
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