Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 5743 | public static function fromSRID(string $srid): Geographic2D|Geographic3D |
|
18 | { |
||
19 | 5743 | if (isset(Geographic2D::getSupportedSRIDs()[$srid])) { |
|
20 | 4924 | return Geographic2D::fromSRID($srid); |
|
21 | } |
||
22 | |||
23 | 819 | if (isset(Geographic3D::getSupportedSRIDs()[$srid])) { |
|
24 | 810 | return Geographic3D::fromSRID($srid); |
|
25 | } |
||
26 | |||
27 | 9 | throw new UnknownCoordinateReferenceSystemException($srid); |
|
28 | } |
||
46 |