From c731909031dfb0b77ee87ac584c33c9a3814d12b Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Thu, 31 Oct 2024 12:10:02 +0100 Subject: [PATCH] Removed code clone --- src/main/rascal/lang/php/stats/Stats.rsc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/main/rascal/lang/php/stats/Stats.rsc b/src/main/rascal/lang/php/stats/Stats.rsc index 1710d1d..22953e6 100644 --- a/src/main/rascal/lang/php/stats/Stats.rsc +++ b/src/main/rascal/lang/php/stats/Stats.rsc @@ -520,28 +520,6 @@ public map[str Product, str Version] getLatestPHP5VersionsByDate() { return ( p : last(v5l)[0] | p <- versions<0>, v5l := sort([ | <- versions[p], "5" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return t1[1] < t2[1]; }), !isEmpty(v5l) ); } -public map[str Product, str Version] getLatestVersionsByVersionNumber() { - versions = loadVersionsCSV(); - return ( p : last(vl)[0] | p <- versions<0>, vl := sort([ | <- versions[p] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0],t2[0]); }) ); -} - -public map[str Product, str Version] getLatestPHP4VersionsByVersionNumber() { - versions = loadVersionsCSV(); - return ( p : last(v4l)[0] | p <- versions<0>, v4l := sort([ | <- versions[p], "4" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0], t2[0]); }), !isEmpty(v4l) ); -} - -public map[str Product, str Version] getLatestPHP5VersionsByVersionNumber() { - versions = loadVersionsCSV(); - return ( p : last(v5l)[0] | p <- versions<0>, v5l := sort([ | <- versions[p], "5" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0],t2[0]); }), !isEmpty(v5l) ); -} - -public map[str Product, str Version] getLatestVersions() = getLatestVersionsByVersionNumber(); - -public map[str Product, str Version] getLatestPHP4Versions() = getLatestPHP4VersionsByVersionNumber(); - -public map[str Product, str Version] getLatestPHP5Versions() = getLatestPHP5VersionsByVersionNumber(); - - public str getPHPVersion(str product, str version) { versions = loadVersionsCSV(); return getOneFrom(versions[product,version,_]<0>);