UnknownVisitLocation::jsonSerialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
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