Code Duplication    Length = 3-3 lines in 2 locations

application/modules/mod_discount/classes/DiscountManager.php 2 locations

@@ 400-402 (lines=3) @@
397
            $this->error[] = lang('Enter a product that is in the database', 'mod_discount');
398
        }
399
400
        if ($typeDiscount == 'user' && !$postArray[$typeDiscount]['user_id']) {
401
            $this->error[] = lang('Enter the user who is in the database', 'mod_discount');
402
        }
403
404
        if ($typeDiscount == 'user' && !$this->validateUserDiscount($postArray[$typeDiscount]['user_id']) && $id == null) {
405
            $this->error[] = lang('This user already have active discount', 'mod_discount');
@@ 404-406 (lines=3) @@
401
            $this->error[] = lang('Enter the user who is in the database', 'mod_discount');
402
        }
403
404
        if ($typeDiscount == 'user' && !$this->validateUserDiscount($postArray[$typeDiscount]['user_id']) && $id == null) {
405
            $this->error[] = lang('This user already have active discount', 'mod_discount');
406
        }
407
408
        if ($typeDiscount == 'group_user' && !$this->validateGroupDiscount($postArray[$typeDiscount]['group_id']) && $id == null) {
409
            $this->error[] = lang('This group of users already have active discount', 'mod_discount');