| Total Complexity | 5 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | abstract class CoordinateSystem |
||
| 12 | { |
||
| 13 | public const CS_TYPE_CARTESIAN = 'Cartesian'; |
||
| 14 | |||
| 15 | public const CS_TYPE_ELLIPSOIDAL = 'ellipsoidal'; |
||
| 16 | |||
| 17 | public const CS_TYPE_ORDINAL = 'ordinal'; |
||
| 18 | |||
| 19 | public const CS_TYPE_SPHERICAL = 'spherical'; |
||
| 20 | |||
| 21 | public const CS_TYPE_VERTICAL = 'vertical'; |
||
| 22 | |||
| 23 | protected string $srid; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var Axis[] |
||
| 27 | */ |
||
| 28 | protected array $axes; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var Axis[] |
||
| 32 | */ |
||
| 33 | protected array $axesByName; |
||
| 34 | |||
| 35 | 189 | public function __construct( |
|
| 36 | string $srid, |
||
| 37 | array $axes |
||
| 38 | ) { |
||
| 39 | 189 | $this->srid = $srid; |
|
| 40 | 189 | $this->axes = $axes; |
|
| 41 | |||
| 42 | 189 | foreach ($this->axes as $axis) { |
|
| 43 | 189 | $this->axesByName[$axis->getName()] = $axis; |
|
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getSRID(): string |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return Axis[] |
||
| 54 | */ |
||
| 55 | 1058 | public function getAxes(): array |
|
| 56 | { |
||
| 57 | 1058 | return $this->axes; |
|
| 58 | } |
||
| 59 | |||
| 60 | 2143 | public function getAxisByName(string $name): ?Axis |
|
| 63 | } |
||
| 64 | } |
||
| 65 |