private function isHeaderOpLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^(old|new|deleted|rename|copy) (file mode|from|to) (.+)#', $line, $matches)) {
            $this->currentOperation = self::$opsMap[$matches[1]];
            return true;
        }
        return false;
    }
private function isHeaderOpLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^(old|new|deleted|rename|copy) (file mode|from|to) (.+)#', $line, $matches)) {
            $this->currentOperation = self::$opsMap[$matches[1]];
            return true;
        }
        return false;
    }
private function isHeaderOpLine ( string $ line ) : bool { $ matches = [ ] ; if ( preg_match ( '#^(old|new|deleted|rename|copy) (file mode|from|to) (.+)#' , $ line , $ matches ) ) { $ this -> currentOperation = self :: $ opsMap [ $ matches [ 1 ] ] ; return true ; } return false ; }
Is the given line a diff header operation line.

new file mode 100644
delete file
rename from some/file
rename to some/other/file

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