UpdateGeoIp   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fire() 0 10 2
A handle() 0 4 1
1
<?php
2
3
namespace PragmaRX\Tracker\Vendor\Laravel\Artisan;
4
5
class UpdateGeoIp extends Base
6
{
7
    /**
8
     * The console command name.
9
     *
10
     * @var string
11
     */
12
    protected $name = 'tracker:updategeoip';
13
14
    /**
15
     * The console command description.
16
     *
17
     * @var string
18
     */
19
    protected $description = 'Update the GeoIP database.';
20
21
    /**
22
     * Update the geo ip database.
23
     *
24
     * @return void
25
     */
26
    public function fire()
27
    {
28
        $tracker = app('tracker');
29
30
        $type = $tracker->updateGeoIp()
31
            ? 'info'
32
            : 'error';
33
34
        $this->displayMessages($type, $tracker->getMessages());
35
    }
36
37
    /**
38
     * Handle the command.
39
     *
40
     * @return void
41
     */
42
    public function handle()
43
    {
44
        $this->fire();
45
    }
46
}
47