Passed
Push — 4.x ( e9b635...bc20e1 )
by Doug
07:44
created

Unity::asUnity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\UnitOfMeasure\Scale;
10
11
class Unity extends Scale
12
{
13
    private float $scale;
14
15 84
    public function __construct(float $scale)
16
    {
17 84
        $this->scale = $scale;
18 84
    }
19
20 27
    public function asUnity(): self
21
    {
22 27
        return $this;
23
    }
24
25 75
    public function getValue(): float
26
    {
27 75
        return $this->scale;
28
    }
29
30 1
    public function getUnitName(): string
31
    {
32 1
        return '';
33
    }
34
}
35