Code Duplication    Length = 8-9 lines in 2 locations

model/connect/Query.php 2 locations

@@ 70-77 (lines=8) @@
67
	 *
68
	 * @return array
69
	 */
70
	public function keyedColumn() {
71
		$column = array();
72
		foreach ($this as $record) {
73
			$val = $record[key($record)];
74
			$column[$val] = $val;
75
		}
76
		return $column;
77
	}
78
79
	/**
80
	 * Return a map from the first column to the second column.
@@ 84-92 (lines=9) @@
81
	 *
82
	 * @return array
83
	 */
84
	public function map() {
85
		$column = array();
86
		foreach ($this as $record) {
87
			$key = reset($record);
88
			$val = next($record);
89
			$column[$key] = $val;
90
		}
91
		return $column;
92
	}
93
94
	/**
95
	 * Returns the next record in the iterator.