Code Duplication    Length = 6-8 lines in 2 locations

src/history/History.php 1 location

@@ 300-305 (lines=6) @@
297
            $min = '';
298
            foreach ($this->getTags() as $tag) {
299
                foreach ($tag->getNotes() as $note) {
300
                    foreach ($note->getCommits() as $commit) {
301
                        $date = $commit->getDate();
302
                        if (!$min || strcmp($date, $min)<0) {
303
                            $min = $date;
304
                        }
305
                    }
306
                }
307
            }
308
            if ($min) {

src/history/Tag.php 1 location

@@ 140-147 (lines=8) @@
137
    public function findDate()
138
    {
139
        $max = '';
140
        foreach ($this->getNotes() as $note) {
141
            foreach ($note->getCommits() as $commit) {
142
                $date = $commit->getDate();
143
                if (strcmp($date, $max) > 0) {
144
                    $max = $date;
145
                }
146
            }
147
        }
148
149
        return $max ?: null;
150
    }