Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | abstract class GeoJSONAbstract implements JsonSerializable{ |
||
19 | |||
20 | protected array $bbox; |
||
21 | |||
22 | /** |
||
23 | * @throws \chillerlan\GeoJSON\GeoJSONException |
||
24 | */ |
||
25 | public function setBbox(array $bbox):GeoJSONAbstract{ |
||
26 | |||
27 | if(!in_array(count($bbox), [4, 6], true)){ |
||
28 | throw new GeoJSONException('invalid bounding box array'); |
||
29 | } |
||
30 | |||
31 | $this->bbox = $bbox; |
||
32 | |||
33 | return $this; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * |
||
38 | */ |
||
39 | abstract public function toArray():array; |
||
40 | |||
41 | /** |
||
42 | * |
||
43 | */ |
||
44 | public function toJSON(int $options = null):string{ |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @inheritDoc |
||
50 | */ |
||
51 | public function jsonSerialize():array{ |
||
53 | } |
||
54 | |||
56 |