Passed
Push — master ( 0baa7a...f13449 )
by Doug
50:51
created

CentesimalSecond   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 22
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A asRadians() 0 3 1
A getUnitName() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\UnitOfMeasure\Angle;
10
11
use const M_PI;
12
13
class CentesimalSecond extends Angle
14
{
15
    private float $angle;
16
17
    public function __construct(float $angle)
18
    {
19
        $this->angle = $angle;
20
    }
21
22
    public function asRadians(): Radian
23
    {
24
        return new Radian($this->angle * M_PI / 2000000);
25
    }
26
27
    public function getValue(): float
28
    {
29
        return $this->angle;
30
    }
31
32
    public function getUnitName(): string
33
    {
34
        return 'centesimal second';
35
    }
36
}
37