Code Duplication    Length = 10-10 lines in 2 locations

src/ORM/Connect/Query.php 2 locations

@@ 49-58 (lines=10) @@
46
     *
47
     * @return array
48
     */
49
    public function keyedColumn()
50
    {
51
        $column = [];
52
53
        foreach ($this as $record) {
54
            $val = $record[key($record)];
55
            $column[$val] = $val;
56
        }
57
        return $column;
58
    }
59
60
    /**
61
     * Return a map from the first column to the second column.
@@ 65-74 (lines=10) @@
62
     *
63
     * @return array
64
     */
65
    public function map()
66
    {
67
        $column = array();
68
        foreach ($this as $record) {
69
            $key = reset($record);
70
            $val = next($record);
71
            $column[$key] = $val;
72
        }
73
        return $column;
74
    }
75
76
    /**
77
     * Returns the first record in the result