Code Duplication    Length = 14-14 lines in 3 locations

src/VersionParser.php 3 locations

@@ 138-151 (lines=14) @@
135
            === $parser->normalize(self::stripGitHash($version2)); 
136
    }
137
138
    private function selectRecentStable()
139
    {
140
        $candidates = array();
141
        foreach ($this->versions as $version) {
142
            if (!$this->stable($version)) {
143
                continue;
144
            }
145
            $candidates[] = $version;
146
        }
147
        if (empty($candidates)) {
148
            return false;
149
        }
150
        return $this->findMostRecent($candidates);
151
    }
152
153
    private function selectRecentUnstable()
154
    {
@@ 153-166 (lines=14) @@
150
        return $this->findMostRecent($candidates);
151
    }
152
153
    private function selectRecentUnstable()
154
    {
155
        $candidates = array();
156
        foreach ($this->versions as $version) {
157
            if ($this->stable($version) || $this->development($version)) {
158
                continue;
159
            }
160
            $candidates[] = $version;
161
        }
162
        if (empty($candidates)) {
163
            return false;
164
        }
165
        return $this->findMostRecent($candidates);
166
    }
167
168
    private function selectRecentAll()
169
    {
@@ 168-181 (lines=14) @@
165
        return $this->findMostRecent($candidates);
166
    }
167
168
    private function selectRecentAll()
169
    {
170
        $candidates = array();
171
        foreach ($this->versions as $version) {
172
            if ($this->development($version)) {
173
                continue;
174
            }
175
            $candidates[] = $version;
176
        }
177
        if (empty($candidates)) {
178
            return false;
179
        }
180
        return $this->findMostRecent($candidates);
181
    }
182
183
    private function findMostRecent(array $candidates)
184
    {