Total Complexity | 4 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class Geographic extends CoordinateReferenceSystem |
||
15 | { |
||
16 | 5 | public static function fromSRID(string $srid): self |
|
17 | { |
||
18 | 5 | if (isset(Geographic2D::getSupportedSRIDs()[$srid])) { |
|
19 | 3 | return Geographic2D::fromSRID($srid); |
|
20 | } |
||
21 | |||
22 | 2 | if (isset(Geographic3D::getSupportedSRIDs()[$srid])) { |
|
23 | 1 | return Geographic3D::fromSRID($srid); |
|
24 | } |
||
25 | |||
26 | 1 | throw new UnknownCoordinateReferenceSystemException($srid); |
|
27 | } |
||
28 | |||
29 | 1 | public static function getSupportedSRIDs(): array |
|
32 | } |
||
33 | } |
||
34 |