Code Duplication    Length = 14-14 lines in 3 locations

src/Intraface/modules/shop/Basket.php 3 locations

@@ 364-377 (lines=14) @@
361
     *
362
     * @return array with customer coupon
363
     */
364
    public function getCustomerCoupon()
365
    {
366
        $sql_extra = implode(" AND ", $this->conditions);
367
        $db = new DB_Sql;
368
        $db->query("SELECT customer_coupon
369
            FROM basket_details
370
            WHERE " . $sql_extra . "
371
                AND intranet_id = " . $this->intranet->getId());
372
        if (!$db->nextRecord()) {
373
            return array();
374
        }
375
376
        return array('customer_coupon' => $db->f('customer_coupon'));
377
    }
378
379
    /**
380
     * Return customer EAN location number
@@ 386-399 (lines=14) @@
383
     *
384
     * @return array with customer ean
385
     */
386
    public function getCustomerEan()
387
    {
388
        $sql_extra = implode(" AND ", $this->conditions);
389
        $db = new DB_Sql;
390
        $db->query("SELECT customer_ean
391
            FROM basket_details
392
            WHERE " . $sql_extra . "
393
                AND intranet_id = " . $this->intranet->getId());
394
        if (!$db->nextRecord()) {
395
            return array();
396
        }
397
398
        return array('customer_ean' => $db->f('customer_ean'));
399
    }
400
401
    /**
402
     * Return customer coupon
@@ 408-421 (lines=14) @@
405
     *
406
     * @return array with customer coupon
407
     */
408
    public function getCustomerComment()
409
    {
410
        $sql_extra = implode(" AND ", $this->conditions);
411
        $db = new DB_Sql;
412
        $db->query("SELECT customer_comment
413
            FROM basket_details
414
            WHERE " . $sql_extra . "
415
                AND intranet_id = " . $this->intranet->getId());
416
        if (!$db->nextRecord()) {
417
            return array();
418
        }
419
420
        return array('customer_comment' => $db->f('customer_comment'));
421
    }
422
423
    /**
424
     * Return payment method