Code Duplication    Length = 7-7 lines in 2 locations

src/baokim/RequestData.php 1 location

@@ 37-43 (lines=7) @@
34
            [['order_id', 'total_amount', 'url_success'], 'required', 'on' => [PaymentGateway::RC_PURCHASE]]
35
        ];
36
37
        if ($this->getClient()->getGateway()->pro && $this->getCommand() === PaymentGateway::RC_PURCHASE) {
38
            return array_merge($rules, [
39
                [['payer_name', 'payer_email', 'payer_phone_no', 'bank_payment_method_id'], 'required', 'on' => PaymentGateway::RC_PURCHASE]
40
            ]);
41
        } else {
42
            return $rules;
43
        }
44
    }
45
46
    /**

src/nganluong/RequestData.php 1 location

@@ 42-48 (lines=7) @@
39
            [['token'], 'required', 'on' => [PaymentGateway::RC_QUERY_DR, PaymentGateway::RC_AUTHENTICATE]]
40
        ];
41
42
        if ($this->getClient()->getGateway()->getSeamless()) {
43
            return array_merge($rules, [
44
                [['card_number', 'card_fullname', 'card_month', 'card_year'], 'required', 'on' => PaymentGateway::RC_PURCHASE]
45
            ]);
46
        } else {
47
            return $rules;
48
        }
49
    }
50
51
    /**