src/Parse/SvnDiffNormalizer.php
public function getFilename(string $fileStartLine): string
    {
        // In case of parse error fall back to returning the line minus the plus or minus symbols.
        if (!preg_match(static::FILENAME_REGEX, $fileStartLine, $matches)) {
            return substr($fileStartLine, 4);
        }

        return $matches['filename'];
    }
public function getFilename(string $fileStartLine): string
    {
        // In case of parse error fall back to returning the line minus the plus or minus symbols.
        if (!preg_match(static::FILENAME_REGEX, $fileStartLine, $matches)) {
            return substr($fileStartLine, 4);
        }

        return $matches['filename'];
    }
public function getFilename ( string $ fileStartLine ) : string { // In case of parse error fall back to returning the line minus the plus or minus symbols. if ( ! preg_match ( static :: FILENAME_REGEX , $ fileStartLine , $ matches ) ) { return substr ( $ fileStartLine , 4 ) ; } return $ matches [ 'filename' ] ; }
Accepts a raw file start line from a unified diff & returns a normalized version of the filename.
Accepts a raw file start line from a unified diff & returns a normalized version of the filename .