File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,13 @@ foreach ($result as $item) {
139139```
140140
141141
142+ Testing
143+ -------
144+ ```
145+ cd tests/
146+ GEOPHP_RUN_TESTS=1 php tests/test.php
147+ ```
148+
142149Credit
143150-------------------------------------------------
144151
Original file line number Diff line number Diff line change @@ -231,7 +231,9 @@ public function numPoints() {
231231 public function getPoints () {
232232 $ points = array ();
233233 foreach ($ this ->components as $ component ) {
234- $ points = array_merge ($ points , $ component ->getPoints ());
234+ foreach ($ component ->getPoints () as $ point ) {
235+ $ points [] = $ point ;
236+ }
235237 }
236238 return $ points ;
237239 }
@@ -290,7 +292,9 @@ public function isSimple() {
290292 public function explode () {
291293 $ parts = array ();
292294 foreach ($ this ->components as $ component ) {
293- $ parts = array_merge ($ parts , $ component ->explode ());
295+ foreach ($ component ->explode () as $ subComponent ) {
296+ $ parts [] = $ subComponent ;
297+ }
294298 }
295299 return $ parts ;
296300 }
You can’t perform that action at this time.
0 commit comments