Completed
Push — master ( 62fb38...736054 )
by Alejandro
13s queued 10s
created

UnknownVisitLocation::getLatitude()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Core\Visit\Model;
5
6
final class UnknownVisitLocation implements VisitLocationInterface
7
{
8
    public function getCountryName(): string
9
    {
10
        return 'Unknown';
11
    }
12
13
    public function getLatitude(): string
14
    {
15
        return '0.0';
16
    }
17
18
    public function getLongitude(): string
19
    {
20
        return '0.0';
21
    }
22
23
    public function getCityName(): string
24
    {
25
        return 'Unknown';
26
    }
27
28
    /**
29
     * Specify data which should be serialized to JSON
30
     * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
31
     * @return mixed data which can be serialized by <b>json_encode</b>,
32
     * which is a value of any type other than a resource.
33
     * @since 5.4.0
34
     */
35
    public function jsonSerialize()
36
    {
37
        return [
38
            'countryCode' => 'Unknown',
39
            'countryName' => 'Unknown',
40
            'regionName' => 'Unknown',
41
            'cityName' => 'Unknown',
42
            'latitude' => '0.0',
43
            'longitude' => '0.0',
44
            'timezone' => 'Unknown',
45
        ];
46
    }
47
}
48