Skip to content

Commit

Permalink
Implement phayes#127
Browse files Browse the repository at this point in the history
  • Loading branch information
gholol committed May 17, 2016
1 parent 3f8d693 commit 13f6880
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Geometry/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ public function numPoints() {
public function getPoints() {
$points = array();
foreach ($this->components as $component) {
$points = array_merge($points, $component->getPoints());
foreach ($component->getPoints() as $point) {
$points[] = $point;
}
}
return $points;
}
Expand Down Expand Up @@ -274,7 +276,9 @@ public function isSimple() {
public function explode() {
$parts = array();
foreach ($this->components as $component) {
$parts = array_merge($parts, $component->explode());
foreach ($component->explode() as $subComponent) {
$parts[] = $subComponent;
}
}
return $parts;
}
Expand Down

0 comments on commit 13f6880

Please sign in to comment.