public function generate()
    {
        if (true === empty($this->log)) {
            return array();
        }

        $log = array();

        // Iterate over grouped entries
        foreach ($this->log as $header => &$entries) {

            // Add a group header (e.g. Bugfixes)
            $log[] = sprintf("\n#### %s", $header);

            // Iterate over entries
            foreach ($entries as &$line) {
                $message = explode(VCS::MSG_SEPARATOR, $line);

                $log[] = sprintf("* %s", trim($message[0]));

                // Include multi-line entries
                if (true === isset($message[1])) {
                    $log[] = sprintf("\n  %s", trim($message[1]));
                }
            }
        }

        // Return a write-ready log
        return array_merge(array("## {$this->release}", "*({$this->date->format('Y-m-d')})*"), $log, array("\n---\n"));
    }
public function generate()
    {
        if (true === empty($this->log)) {
            return array();
        }

        $log = array();

        // Iterate over grouped entries
        foreach ($this->log as $header => &$entries) {

            // Add a group header (e.g. Bugfixes)
            $log[] = sprintf("\n#### %s", $header);

            // Iterate over entries
            foreach ($entries as &$line) {
                $message = explode(VCS::MSG_SEPARATOR, $line);

                $log[] = sprintf("* %s", trim($message[0]));

                // Include multi-line entries
                if (true === isset($message[1])) {
                    $log[] = sprintf("\n  %s", trim($message[1]));
                }
            }
        }

        // Return a write-ready log
        return array_merge(array("## {$this->release}", "*({$this->date->format('Y-m-d')})*"), $log, array("\n---\n"));
    }
public function generate ( ) { if ( true === empty ( $ this -> log ) ) { return array ( ) ; } $ log = array ( ) ; // Iterate over grouped entries foreach ( $ this -> log as $ header => & $ entries ) { // Add a group header (e.g. Bugfixes) $ log [ ] = sprintf ( "\n#### %s" , $ header ) ; // Iterate over entries foreach ( $ entries as & $ line ) { $ message = explode ( VCS :: MSG_SEPARATOR , $ line ) ; $ log [ ] = sprintf ( "* %s" , trim ( $ message [ 0 ] ) ) ; // Include multi-line entries if ( true === isset ( $ message [ 1 ] ) ) { $ log [ ] = sprintf ( "\n  %s" , trim ( $ message [ 1 ] ) ) ; } } } // Return a write-ready log return array_merge ( array ( "## {$this->release}" , "*({$this->date->format('Y-m-d')})*" ) , $ log , array ( "\n---\n" ) ) ; }
Returns a write-ready log.

@return array
Returns a write - ready log .