Code Duplication    Length = 5-7 lines in 2 locations

src/handlers/ChangelogHandler.php 1 location

@@ 35-39 (lines=5) @@
32
            $new = CommitsHandler::arrayPop($notes, '');
33
            $res .= CommitsHandler::renderTag($tag);
34
            $this->releaseNotes[$tag] = '';
35
            foreach ($notes as $note => $cs) {
36
                $note = CommitsHandler::arrayPop($cs, 'note');
37
                $res .= CommitsHandler::renderNote($note) ?: $note;
38
                $this->releaseNotes[$tag] .= CommitsHandler::renderNote($note) ?: $note;
39
            }
40
        }
41
42
        return $res;

src/handlers/CommitsHandler.php 1 location

@@ 184-190 (lines=7) @@
181
            foreach ($new as $hash => $lines) {
182
                $res .= static::renderLines($lines);
183
            }
184
            foreach ($notes as $note => $cs) {
185
                $note = static::arrayPop($cs, 'note');
186
                $res .= static::renderNote($note);
187
                foreach ($cs as $hash => $lines) {
188
                    $res .= static::renderLines($lines);
189
                }
190
            }
191
            /// TODO redo with cleanupHistory
192
            /// skip empty Under development section
193
            if ($save === $res && stripos($tag, static::getVcs()->lastTag) !== false) {