Is the given line a diff header line.

diff --git a/some/file b/some/file

@param  string $line
@return bool
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;
    }
930692
function (line) {
		line = line || "";
		line = line.trim();

		if (line.length === 0) {
			return true;
		}

		return false;
	}
461131
public function removeLine(int $line): void
    {
        foreach ($this->file->getTokens() as $tagPtr => $tagToken) {
            if ($tagToken['line'] !== $line) {
                continue;
            }

            $this->fixer->replaceToken($tagPtr, '');

            if ($tagToken['line'] > $line) {
                break;
            }
        }
    }
178178
private function findMode(string $line)
    {
        if (preg_match('/^index (.*)\.\.(.*) (.*)$/', $line)) {
            $this->mode = self::MODE_INDEX;
        }

        if (preg_match('/^mode (.*)\.\.(.*) (.*)$/', $line)) {
            $this->mode = self::MODE_MODE;
        }

        if (preg_match('/^new file mode (.*)/', $line)) {
            $this->mode = self::MODE_NEW_FILE;
        }

        if (preg_match('/^deleted file mode (.*)/', $line)) {
            $this->mode = self::MODE_DELETED_FILE;
        }
    }
1087061
protected function parseCommentLine( Line$line ):self
	{
		$node= new CommentNode($this,$line);

		return $this->openNode($node)->appendLine($node->open());
	}
1346837
protected function parseTagLine( Line$line ):self
	{
		$node= new TagNode($this,$line);

		$this->appendLine($node->open());

		$node->embed and $this->startEmbedding($node->embed);

		return $this->openNode($node);
	}
99558
public function add($line)
    {
        if (!is_numeric($line) ||
            (
                isset($this->delay) &&
                $this->delay > 0
            )
        ) {
            return false;
        }
        // PHP hack to convert numeric string to float or int
        // http://stackoverflow.com/questions/16606364/php-cast-string-to-either-int-or-float
        $this->delay = $line + 0;
        return true;
    }
133905
public function add($line)
    {
        if ($line == '' ||
            ($pair = $this->generateRulePair($line, [-1 => self::DIRECTIVE_USER_AGENT] + array_keys(self::SUB_DIRECTIVES))) === false) {
            return $this->append = false;
        }
        if ($pair[0] === self::DIRECTIVE_USER_AGENT) {
            return $this->set($pair[1]);
        }
        $this->append = false;
        $result = [];
        foreach ($this->current as $group) {
            $result[] = $this->handler[$group]->{self::SUB_DIRECTIVES[$pair[0]]}->add($pair[1]);
            $this->handler[$group]->count++;
        }
1059333
protected function include( Line$line ):self
	{
		$inclued= (new static($this->htsl,$this->buffer->goSide($line->pregGet('/(?<=\( ).*(?= \))/')),$this))->execute()->content??null;

		false===$this->indentation or $inclued= $this->insertIndentations($inclued);

		return $this->openNode(new StringNode($this,$line))->append($inclued);
	}
570447
protected function parseHtmlLine( Line$line ):self
	{
		return $this->openNode(new StringNode($this,$line))->appendLine($line->slice(1));
	}
1214456
public function analyseUNA(string $line)
    {
        $line = \substr($line, 0, 6);
        if (isset($line[0])) {
            $this->sepComp = \preg_quote($line[0], self::$DELIMITER);
            $this->sepUnescapedComp = $line[0];
            if (isset($line[1])) {
                $this->sepData = \preg_quote($line[1], self::$DELIMITER);
                if (isset($line[2])) {
                    $this->sepDec = $line[2]; // See later if a preg_quote is needed
                    if (isset($line[3])) {
                        $this->symbRel = \preg_quote($line[3], self::$DELIMITER);
                        $this->symbUnescapedRel = $line[3];
                        if (isset($line[4])) {
                            $this->symbRep = $line[4]; // See later if a preg_quote is needed
                            if (isset($line[5])) {
                                $this->symbEnd = \preg_quote($line[5], self::$DELIMITER);
                            }
                        }
                    }
                }
            }
            $this->unaChecked = true;
        }
    }
28035
public function writeFreeFormLine($line)
	{
        if ($this->_logStatus == self::STATUS_LOG_OPEN
            && $this->_severityThreshold != self::OFF) {
            if (fwrite($this->_fileHandle, $line) === false) {
                $this->_messageQueue[] = $this->_messages['writefail'];
            }
        }
    }
1359497
public function add($line)
    {
        $uriParser = new UriParser($line);
        $uri = $uriParser->encode();
        if (!$uriParser->validate() ||
            in_array($uri, $this->sitemaps)
        ) {
            return false;
        }
        $this->sitemaps[] = $uri;
        return true;
    }
670604
public function write($line)
    {
        return $this->pipes !== null ? fwrite($this->pipes[0], $line . PHP_EOL) : false;
    }
663648
private function parseLine($line)
    {
        if ($line == '') {
            return;
        }

        $slices = NodeObject::getLineSlices($line);
        if ($this->isBlob()) {
            $this->pathChildren[] = $this->blob->getName();
        } else {
            if ($this->isRoot()) {
                // if is root check for first children
                $pattern = '/(\w+)\/(.*)/';
                $replacement = '$1';
            } else {
                // filter by the children of the path
                $actualPath = $this->subject->getFullPath();
                if (!preg_match(sprintf('/^%s\/(\w*)/', preg_quote($actualPath, '/')), $slices['fullPath'])) {
                    return;
                }
                $pattern = sprintf('/^%s\/(\w*)/', preg_quote($actualPath, '/'));
                $replacement = '$1';
            }

            $name = preg_replace($pattern, $replacement, $slices['fullPath']);
            if (strpos($name, '/') !== false) {
                return;
            }

            if (!in_array($name, $this->pathChildren)) {
                $path = rtrim(rtrim($slices['fullPath'], $name), '/');
                $treeObject = new TreeObject(
                    $this->repository,
                    $slices['permissions'],
                    $slices['type'],
                    $slices['sha'],
                    $slices['size'],
                    $name,
                    $path
                );
                $this->children[] = $treeObject;
                $this->pathChildren[] = $name;
            }
        }
    }
192263
private function findSimilarityIndex(string $line)
    {
        $matches = [];
        if (preg_match('/^similarity index (.*)\%$/', $line, $matches)) {
            $this->similarityIndex = $matches[1];
        }
    }
1120010
public function parseLine($line) {
        $line = trim($line, "\r\n");

        if (preg_match('/^([\w-]+):\s+(.+)/', $line, $matches)) {
            $name = strtolower($matches[1]);
            $value = $matches[2];
            $this->currentHeader = $name;

            if (isset($this->headers[$name])) {
                if (!is_array($this->headers[$name])) {
                    $this->headers[$name] = [$this->headers[$name]];
                }
                $this->headers[$name][] = $value;
            }
            else {
                $this->headers[$name] = $value;
            }
        }
        elseif (preg_match('/^\s+(.+)$/', $line, $matches) && $this->currentHeader !== null) {
            if (is_array($this->headers[$this->currentHeader])) {
                $lastKey = sizeof($this->headers[$this->currentHeader]) - 1;
                $this->headers[$this->currentHeader][$lastKey] .= $matches[1];
            }
            else {
                $this->headers[$this->currentHeader] .= $matches[1];
            }
        }

        return $this;
    }