private function getUnindentedSelectedCode() { $detector = new IndentationDetector($this->selectedCode); $lines = array_map(function ($line) use($detector) { return substr($line, $detector->getMinIndentation()); }, iterator_to_array(new ToStringIterator($this->selectedCode->getIterator()))); return LineCollection::createFromArray($lines); }
public function testAppendlankLine() { $lines = new LineCollection(); $lines->appendBlankLine(); $this->assertEquals(array(''), iterator_to_array(new ToStringIterator($lines->getIterator()))); }