Passed
Pull Request — master (#12)
by Laurens
01:42
created

AbstractLocation::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\ApplePassbook\MetaData\SemanticTag;
6
7
use LauLamanApps\ApplePassbook\MetaData\SemanticTag;
8
9
abstract class AbstractLocation implements SemanticTag
10
{
11
    private float $latitude;
12
    private float $longitude;
13
14
    public function __construct(
15
        float $latitude,
16
        float $longitude
17
    ) {
18
        $this->latitude = $latitude;
19
        $this->longitude = $longitude;
20
    }
21
22
    /**
23
     * @return array<string, float>
24
     */
25
    public function getValue(): array
26
    {
27
        return [
28
            'latitude' => $this->latitude,
29
            'longitude' => $this->longitude,
30
        ];
31
    }
32
}