Code Duplication    Length = 15-15 lines in 2 locations

src/Database/DatabaseQuery.php 2 locations

@@ 187-201 (lines=15) @@
184
     *
185
     * @return string
186
     */
187
    protected static function buildColumn($data)
188
    {
189
        $counter = 0;
190
        $insertQuery = "";
191
        $arraySize = count($data);
192
193
        foreach ($data as $key => $value)
194
        {
195
            $counter++;
196
            $insertQuery .= self::sanitize($key);
197
            if($arraySize > $counter)
198
                $insertQuery .= ", ";
199
        }
200
        return $insertQuery;
201
    }
202
203
    /**
204
     * buildValues  Build the column values
@@ 210-224 (lines=15) @@
207
     *
208
     * @return string
209
     */
210
    protected static function buildValues($data)
211
    {
212
        $counter = 0;
213
        $insertQuery = "";
214
        $arraySize = count($data);
215
216
        foreach ($data as $key => $value)
217
        {
218
            $counter++;
219
            $insertQuery .= "'".self::sanitize($value) ."'";
220
            if($arraySize > $counter)
221
                $insertQuery .= ", ";
222
        }
223
        return $insertQuery;
224
    }
225
226
    /**
227
     * buildClause  Build the clause value