UnknownVisitLocation   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 32
rs 10
c 0
b 0
f 0
ccs 0
cts 10
cp 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getLatitude() 0 3 1
A getCityName() 0 3 1
A getCountryName() 0 3 1
A getLongitude() 0 3 1
A jsonSerialize() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\Visit\Model;
6
7
final class UnknownVisitLocation implements VisitLocationInterface
8
{
9
    public function getCountryName(): string
10
    {
11
        return 'Unknown';
12
    }
13
14
    public function getLatitude(): float
15
    {
16
        return 0.0;
17
    }
18
19
    public function getLongitude(): float
20
    {
21
        return 0.0;
22
    }
23
24
    public function getCityName(): string
25
    {
26
        return 'Unknown';
27
    }
28
29
    public function jsonSerialize(): array
30
    {
31
        return [
32
            'countryCode' => 'Unknown',
33
            'countryName' => 'Unknown',
34
            'regionName' => 'Unknown',
35
            'cityName' => 'Unknown',
36
            'latitude' => 0.0,
37
            'longitude' => 0.0,
38
            'timezone' => 'Unknown',
39
        ];
40
    }
41
}
42