protected function getNewLines($type, $version, $comment)
    {
        list($major, $minor, $patch) = explode('.', $version);
        if ($type == 'major') {
            $title = "version $major  $comment";

            return array_merge(
                array(
                    '',
                    strtoupper($title),
                    str_pad('', strlen($title), '='),
                ),
                $this->getNewLines('minor', $version, $comment)
            );
        } elseif ($type == 'minor') {
            return array_merge(
                array(
                    '',
                    "   Version $major.$minor - $comment",
                ),
                $this->getNewLines('patch', $version, 'initial release')
            );
        } else { //patch
            $date = $this->getFormattedDate();

            return array(
                "      $date  $version  $comment",
            );
        }
    }
protected function getNewLines($type, $version, $comment)
    {
        list($major, $minor, $patch) = explode('.', $version);
        if ($type == 'major') {
            $title = "version $major  $comment";

            return array_merge(
                array(
                    '',
                    strtoupper($title),
                    str_pad('', strlen($title), '='),
                ),
                $this->getNewLines('minor', $version, $comment)
            );
        } elseif ($type == 'minor') {
            return array_merge(
                array(
                    '',
                    "   Version $major.$minor - $comment",
                ),
                $this->getNewLines('patch', $version, 'initial release')
            );
        } else { //patch
            $date = $this->getFormattedDate();

            return array(
                "      $date  $version  $comment",
            );
        }
    }
protected function getNewLines ( $ type , $ version , $ comment ) { list ( $ major , $ minor , $ patch ) = explode ( '.' , $ version ) ; if ( $ type == 'major' ) { $ title = "version $major  $comment" ; return array_merge ( array ( '' , strtoupper ( $ title ) , str_pad ( '' , strlen ( $ title ) , '=' ) , ) , $ this -> getNewLines ( 'minor' , $ version , $ comment ) ) ; } elseif ( $ type == 'minor' ) { return array_merge ( array ( '' , "   Version $major.$minor - $comment" , ) , $ this -> getNewLines ( 'patch' , $ version , 'initial release' ) ) ; } else { //patch $ date = $ this -> getFormattedDate ( ) ; return array ( "      $date  $version  $comment" , ) ; } }
Return the new formatted lines for the given variables

@param string $type    The version type, could be major, minor, patch
@param string $version The new version number
@param string $comment The user comment

@return array An array of new lines
Return the new formatted lines for the given variables