InverseVincentyBearing   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 55
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getDistance() 0 4 1
A getBearingInitial() 0 4 1
A getBearingFinal() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Location\Bearing;
6
7
/**
8
 * Value object for a "Direct Vincenty" bearing calculation result.
9
 *
10
 * @author Marcus Jaschen <[email protected]>
11
 */
12
class InverseVincentyBearing
13
{
14
    /**
15
     * @var float
16
     */
17
    private $distance;
18
19
    /**
20
     * @var float
21
     */
22
    private $bearingInitial;
23
24
    /**
25
     * @var float
26
     */
27
    private $bearingFinal;
28
29
    /**
30
     * InverseVincentyBearing constructor.
31
     *
32
     * @param float $distance
33
     * @param float $bearingInitial
34
     * @param float $bearingFinal
35
     */
36
    public function __construct(float $distance, float $bearingInitial, float $bearingFinal)
37
    {
38
        $this->distance       = $distance;
39
        $this->bearingInitial = $bearingInitial;
40
        $this->bearingFinal   = $bearingFinal;
41
    }
42
43
    /**
44
     * @return float
45
     */
46
    public function getDistance(): float
47
    {
48
        return $this->distance;
49
    }
50
51
    /**
52
     * @return float
53
     */
54
    public function getBearingInitial(): float
55
    {
56
        return $this->bearingInitial;
57
    }
58
59
    /**
60
     * @return float
61
     */
62
    public function getBearingFinal(): float
63
    {
64
        return $this->bearingFinal;
65
    }
66
}
67