Add current line to a table

@param  string $line Line of text
@return void
420053
protected function addLine($line)
	{
		$ignoreLen = 0;

		if (!isset($this->table))
		{
			$this->table = [];

			// Make the table start at the first non-space character
			preg_match('/^ */', $line, $m);
			$ignoreLen = strlen($m[0]);
			$line      = substr($line, $ignoreLen);
		}

		// Overwrite the outermost pipes
		$line = preg_replace('/^( *)\\|/', '$1 ', $line);
		$line = preg_replace('/\\|( *)$/', ' $1', $line);

		$this->table['rows'][] = ['line' => $line, 'pos' => $this->pos + $ignoreLen];
	}
1084103
private void addLine(Content pre, String line, int currentLineNo) {
        if (line != null) {
            pre.addContent(Util.replaceTabs(configuration, line));
            Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
            pre.addContent(anchor);
            pre.addContent(NEW_LINE);
        }
    }
280634
public function setLine($line)
    {
        if ($line === null) {
            return;
        }
        $this->parts = $this->outer::translateCommandline($line);
    }
1227575
public function printLine($line)
    {
        if (!$this->handle) {
            throw new \RuntimeException('can not write to file: invalid file handle');
        }
        fwrite($this->handle, $line . "\n");
        ++$this->lineNumber;
    }
1363070
protected function parseStringLine( Line$line ):self
	{
		return $this->openNode(new StringNode($this,$line))->appendLine($this->htmlEntities(trim($line->getContent())));
	}
705700
private function doSkip(string $line): bool
    {
        switch (true) {
            case (empty(trim($line))):
                // empty line
                $skip = true;
                break;
            case (1 == preg_match('/(#[\s\w]+)/', $line)):
                if (1 === $this->linecountOverall) {
                    $this->addName($line);
                }
                $skip = true;
                break;
            default:
                $skip = false;
        }

        return $skip;
    }
200386
private function moveToNextLine(): bool
    {
        if ($this->currentLineNb >= \count($this->lines) - 1) {
            return false;
        }

        $this->currentLine = $this->lines[++$this->currentLineNb];

        return true;
    }
834891
public function addLine(string $line): Source
    {
        if (strpos($line, "\n") !== false) {
            throw new MultilineException(
                "New line character is forbidden in addLine method argument"
            );
        }

        $this->lines[] = $line;

        return $this;
    }
515178
public function delete($line, $lines)
    {
        foreach (range(0, $lines-1) as $offset) {
            $this->lines[$line+$offset-1] = null;
        }
        return $this;
    }
329308
public function addErrorOutput($line)
    {
        $this->lastOutputTime = microtime(true);

        fseek($this->stderr, 0, SEEK_END);
        fwrite($this->stderr, $line);
        fseek($this->stderr, $this->incrementalErrorOutputOffset);
    }
853455
public function logFatal($line, $args = self::NO_ARGUMENTS)
	{
        $this->log($line, self::FATAL, $args);
    }
963
private function isHeaderLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^diff --git [a|b|c|i|w|o]/(.*) [a|b|c|i|w|o]/(.*)#', $line, $matches)) {
            $this->appendCollectedFileAndChanges();
            $this->currentOperation = File::OP_MODIFIED;
            $this->currentFileName  = $matches[2];
            return true;
        }
        return false;
    }
776980
public function display($line)
    {
        $server = $this->username.'@'.$this->host;

        $lead = '<comment>['.$server.']</comment> <info>('.$this->name.')</info>';

        $this->getOutput()->writeln($lead.' '.$line);
    }
1053601
public void addLine(String line) {
        try {
            writer.append(line);
            writer.newLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
575849
private function isHeaderIndexLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^index\s([a-z0-9]+)\.\.([a-z0-9]+)(.*)$#i', $line, $matches)) {
            $this->currentFile = new File($this->currentFileName, $this->currentOperation);
            return true;
        }
        return false;
    }
1373873
protected function currentTopLine($lines, $total_lines, $current)
    {
        $keyframe = array_slice($lines, -$current, $current);

        return array_merge($keyframe, array_fill(0, $total_lines - $current, ''));
    }
87253
private function addName(string $line)
    {
        $this->definition[self::PROPERTIES_LABEL]['name'] = trim(str_replace('#', '', $line));
    }