public function parse( $string )
    {
        $string = $this->normalizeWhitespaces( $string );
        if ( $string === '' )
        {
            throw new arbitCommitParserException(
                'Empty commit message.'
            );
        }

        $string = $this->removeComments( $string );
        if ( $string === '' )
        {
            // Do not enter parsing process if there were only comments in the
            // commit message.
            return array();
        }

        return $this->parseStatements( $string );
    }
public function parse( $string )
    {
        $string = $this->normalizeWhitespaces( $string );
        if ( $string === '' )
        {
            throw new arbitCommitParserException(
                'Empty commit message.'
            );
        }

        $string = $this->removeComments( $string );
        if ( $string === '' )
        {
            // Do not enter parsing process if there were only comments in the
            // commit message.
            return array();
        }

        return $this->parseStatements( $string );
    }
public function parse ( $ string ) { $ string = $ this -> normalizeWhitespaces ( $ string ) ; if ( $ string === '' ) { throw new arbitCommitParserException ( 'Empty commit message.' ) ; } $ string = $ this -> removeComments ( $ string ) ; if ( $ string === '' ) { // Do not enter parsing process if there were only comments in the // commit message. return array ( ) ; } return $ this -> parseStatements ( $ string ) ; }
Parse a commit message

Parses a commit messages defined by the grammar documented in the class
header. If a parse error occurs an exception will be thrown containing
the error message.

On a successful parsing process a struct containing a list with all
relevant data will be returned, which looks like:

<code>
array(
array(
'type' => <type>,
'bug'  => <number> | null,
'text' => <text>,
),
...
)
</code>

@param string $string
@return array
Parse a commit message