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

@@ 323-328 (lines=6) @@
320
            $min = '';
321
            foreach ($this->getTags() as $tag) {
322
                foreach ($tag->getNotes() as $note) {
323
                    foreach ($note->getCommits() as $commit) {
324
                        $date = $commit->getDate();
325
                        if (!$min || strcmp($date, $min) < 0) {
326
                            $min = $date;
327
                        }
328
                    }
329
                }
330
            }
331
            if ($min) {