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