Code Duplication    Length = 7-7 lines in 3 locations

Ubiquity/db/SqlUtils.php 3 locations

@@ 33-39 (lines=7) @@
30
		return $ret;
31
	}
32
33
	public static function getWhere($keyAndValues) {
34
		$ret=array ();
35
		foreach ( $keyAndValues as $key => $value ) {
36
			$ret[]=self::$quote . $key . self::$quote . "= :" . $key;
37
		}
38
		return implode(" AND ", $ret);
39
	}
40
41
	public static function getMultiWhere($values, $field) {
42
		$ret=array ();
@@ 41-47 (lines=7) @@
38
		return implode(" AND ", $ret);
39
	}
40
41
	public static function getMultiWhere($values, $field) {
42
		$ret=array ();
43
		foreach ( $values as $value ) {
44
			$ret[]=self::$quote . $field . self::$quote . "='" . $value . "'";
45
		}
46
		return implode(" OR ", $ret);
47
	}
48
	
49
	public static function getSearchWhere($fields, $value,$jokerBefore="%",$jokerAfter="%") {
50
		$ret=array ();
@@ 65-71 (lines=7) @@
62
		return implode(",", self::getParameters($keyAndValues));
63
	}
64
65
	public static function getUpdateFieldsKeyAndValues($keyAndValues) {
66
		$ret=array ();
67
		foreach ( $keyAndValues as $key => $value ) {
68
			$ret[]=self::$quote . $key . self::$quote . "= :" . $key;
69
		}
70
		return implode(",", $ret);
71
	}
72
73
	public static function checkWhere($condition){
74
		$c=\strtolower($condition);