AbstractSphere::getRadius()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace ZeroConfig\GeoDistance\Sphere;
4
5
use Measurements\Quantities\Length;
6
use Measurements\Units\UnitLength;
7
8
abstract class AbstractSphere implements SphereInterface
9
{
10
    const RADIUS = .0;
11
12
    /**
13
     * Get the radius of the sphere in meters.
14
     *
15
     * @return Length
16
     */
17 1
    public function getRadius(): Length
18
    {
19 1
        return new Length(
20 1
            static::RADIUS,
21 1
            UnitLength::meters()
22
        );
23
    }
24
}
25