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;
    }
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;
    }
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 ; }
Is the given line a diff header line.

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

@param  string $line
@return bool
Is the given line a diff header line .