Passed
Pull Request — master (#258)
by Alejandro
04:00
created

GeoLite2Options   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 37
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setDownloadFrom() 0 4 1
A setDbLocation() 0 4 1
A getTempDir() 0 3 1
A setTempDir() 0 4 1
A getDownloadFrom() 0 3 1
A getDbLocation() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Common\IpGeolocation\GeoLite2;
5
6
use Zend\Stdlib\AbstractOptions;
7
8
class GeoLite2Options extends AbstractOptions
9
{
10
    private $dbLocation = '';
11
    private $tempDir = '';
12
    private $downloadFrom = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz';
13
14 3
    public function getDbLocation(): string
15
    {
16 3
        return $this->dbLocation;
17
    }
18
19 5
    protected function setDbLocation(string $dbLocation): self
20
    {
21 5
        $this->dbLocation = $dbLocation;
22 5
        return $this;
23
    }
24
25 5
    public function getTempDir(): string
26
    {
27 5
        return $this->tempDir;
28
    }
29
30 5
    protected function setTempDir(string $tempDir): self
31
    {
32 5
        $this->tempDir = $tempDir;
33 5
        return $this;
34
    }
35
36 5
    public function getDownloadFrom(): string
37
    {
38 5
        return $this->downloadFrom;
39
    }
40
41 5
    protected function setDownloadFrom(string $downloadFrom): self
42
    {
43 5
        $this->downloadFrom = $downloadFrom;
44 5
        return $this;
45
    }
46
}
47