Code Duplication    Length = 12-12 lines in 2 locations

src/Query.php 2 locations

@@ 277-288 (lines=12) @@
274
     * @param string $sql
275
     * @return string
276
     */
277
    private function addforUpdate($dbDriver, $sql)
278
    {
279
        if (empty($this->forUpdate)) {
280
            return $sql;
281
        }
282
283
        if (is_null($dbDriver)) {
284
            throw new \InvalidArgumentException('To get FOR UPDATE working you have to pass the DbDriver');
285
        }
286
287
        return $dbDriver->getDbHelper()->forUpdate($sql);
288
    }
289
290
    /**
291
     * @param DbDriverInterface $dbDriver
@@ 295-306 (lines=12) @@
292
     * @param string $sql
293
     * @return string
294
     */
295
    private function addTop($dbDriver, $sql)
296
    {
297
        if (empty($this->top)) {
298
            return $sql;
299
        }
300
301
        if (is_null($dbDriver)) {
302
            throw new \InvalidArgumentException('To get Limit and Top working you have to pass the DbDriver');
303
        }
304
305
        return $dbDriver->getDbHelper()->top($sql, $this->top);
306
    }
307
308
    /**
309
     * @param DbDriverInterface $dbDriver