public function getReverse() { $reversed = new static(); foreach (array_reverse($this->points) as $point) { $reversed->addPoint($point); } return $reversed; }
public function testReverseTwiceWorksAsExpected() { $doubleReversed = $this->polyline->getReverse()->getReverse(); $this->assertEquals($this->polyline, $doubleReversed); }