Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
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 | } |
||
34 |