AbstractSphere   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRadius() 0 5 1
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