PHP Class Liip\RMT\Changelog\Formatter\SemanticChangelogFormatter

Format a changelog file in a sementic style. Here is an example: VERSION 1 MAJOR TITLE ====================== Version 1.1 - Minor Title 08/11/1980 12:34 1.1.1 patch comment ada96f3 commit msg 2eb6fae commit msg 08/11/1980 03:56 1.1.0 initial release' 2eb6fae commit msg Version 1.0 - Minor Title 08/11/1980 03:56 1.0.0 initial release' 2eb6fae commit msg VERSION 0 BETA =============== Version 0.9 - Minor Title 08/11/1980 12:34 0.9.1 patch comment ada96f3 commit msg 2eb6fae commit msg 08/11/1980 03:56 0.9.0 initial release' 2eb6fae commit msg
Show file Open project: liip/rmt

Public Methods

Method Description
getLastVersionRegex ( )
updateExistingLines ( $lines, $version, $comment, $options )

Protected Methods

Method Description
findPositionToInsert ( array $lines, string $type ) : integer Return the position where to insert new lines according to the type of insertion
getFormattedDate ( )
getNewLines ( string $type, string $version, string $comment ) : array Return the new formatted lines for the given variables

Method Details

findPositionToInsert() protected method

Return the position where to insert new lines according to the type of insertion
protected findPositionToInsert ( array $lines, string $type ) : integer
$lines array Existing lines
$type string Release type
return integer The position where to insert

getFormattedDate() protected method

protected getFormattedDate ( )

getLastVersionRegex() public method

public getLastVersionRegex ( )

getNewLines() protected method

Return the new formatted lines for the given variables
protected getNewLines ( string $type, string $version, string $comment ) : array
$type string The version type, could be major, minor, patch
$version string The new version number
$comment string The user comment
return array An array of new lines

updateExistingLines() public method

public updateExistingLines ( $lines, $version, $comment, $options )