| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class SpatialDimension |
||
| 7 | { |
||
| 8 | protected string $dimension; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string[] |
||
| 12 | */ |
||
| 13 | protected array $dims; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param string $dimension The name of the spatial dimension. A spatial dimension may be constructed from |
||
| 17 | * multiple other dimensions or it may already exist as part of an event. If a spatial |
||
| 18 | * dimension already exists, it must be an array of coordinate values. |
||
| 19 | * @param string[] $dims A list of dimension names that comprise a spatial dimension. |
||
| 20 | */ |
||
| 21 | 3 | public function __construct(string $dimension, array $dims) |
|
| 22 | { |
||
| 23 | |||
| 24 | 3 | $this->dimension = $dimension; |
|
| 25 | 3 | $this->dims = $dims; |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return array<string,string|string[]> |
||
| 30 | */ |
||
| 31 | 2 | public function toArray(): array |
|
| 36 | ]; |
||
| 37 | } |
||
| 39 |