Code Duplication    Length = 6-8 lines in 2 locations

src/history/Tag.php 1 location

@@ 146-153 (lines=8) @@
143
    public function findDate()
144
    {
145
        $max = '';
146
        foreach ($this->getNotes() as $note) {
147
            foreach ($note->getCommits() as $commit) {
148
                $date = $commit->getDate();
149
                if (strcmp($date, $max) > 0) {
150
                    $max = $date;
151
                }
152
            }
153
        }
154
155
        return $max ?: null;
156
    }

src/modifiers/AddInitTag.php 1 location

@@ 29-34 (lines=6) @@
26
            $min = '';
27
            foreach ($history->getTags() as $tag) {
28
                foreach ($tag->getNotes() as $note) {
29
                    foreach ($note->getCommits() as $commit) {
30
                        $date = $commit->getDate();
31
                        if (!$min || strcmp($date, $min) < 0) {
32
                            $min = $date;
33
                        }
34
                    }
35
                }
36
            }
37
            if ($min) {