/** * @param string $ln * @param int $offset * * @throws \RuntimeException */ protected function addLine($ln, $offset) { $s = substr($ln, $offset); if ($s === false) { $s = ''; } if (!$this->tip->getIsOpen()) { throw new RuntimeException(sprintf('Attempted to add line (%s) to closed container.', $ln)); } $this->tip->getStrings()->add($s); }