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/history/History.php 1 location

@@ 329-334 (lines=6) @@
326
            $min = '';
327
            foreach ($this->getTags() as $tag) {
328
                foreach ($tag->getNotes() as $note) {
329
                    foreach ($note->getCommits() as $commit) {
330
                        $date = $commit->getDate();
331
                        if (!$min || strcmp($date, $min) < 0) {
332
                            $min = $date;
333
                        }
334
                    }
335
                }
336
            }
337
            if ($min) {