src/Parser.php
public function parseFile(string $filename, string $vcsType = ''): Changeset
    {
        $parser = $this->getParser($vcsType);

        if (!file_exists($filename)) {
            throw new \RuntimeException(
                'File "' . $filename . '" not found.'
            );
        }

        return $parser->parse(
            file($filename, FILE_IGNORE_NEW_LINES)
        );
    }
public function parseFile(string $filename, string $vcsType = ''): Changeset
    {
        $parser = $this->getParser($vcsType);

        if (!file_exists($filename)) {
            throw new \RuntimeException(
                'File "' . $filename . '" not found.'
            );
        }

        return $parser->parse(
            file($filename, FILE_IGNORE_NEW_LINES)
        );
    }
public function parseFile ( string $ filename , string $ vcsType = '' ) : Changeset { $ parser = $ this -> getParser ( $ vcsType ) ; if ( ! file_exists ( $ filename ) ) { throw new \ RuntimeException ( 'File "' . $ filename . '" not found.' ) ; } return $ parser -> parse ( file ( $ filename , FILE_IGNORE_NEW_LINES ) ) ; }
Accepts an filename for a diff & returns a Changeset instance.
Accepts an filename for a diff & returns a Changeset instance .