File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
app/code/Magento/SalesRule
Controller/Adminhtml/Promo/Quote Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ public function execute()
98
98
&& !$ rule ->getUseAutoGeneration ()) {
99
99
$ result ['error ' ] =
100
100
__ ('The rule coupon settings changed. Please save the rule before using auto-generation. ' );
101
- } elseif (
102
- (int )$ this ->getRequest ()->getParams ()['length ' ] !==
101
+ } elseif ((int )$ this ->getRequest ()->getParams ()['length ' ] !==
103
102
$ this ->validateCouponLengthWithQuantity ->validateCouponCodeLengthWithQuantity (
104
103
$ this ->getRequest ()->getParams ()
105
104
)
Original file line number Diff line number Diff line change 17
17
class ValidateCouponLengthWithQuantity implements ValidateCouponLengthWithQuantityInterface
18
18
{
19
19
/**
20
- * Sales rule coupon
20
+ * Initialize Sales rule coupon property
21
21
*
22
22
* @var Coupon
23
23
*/
24
24
protected Coupon $ salesRuleCoupon ;
25
25
26
26
/**
27
- * @param Coupon $salesRuleCoupon
27
+ * Generate constructor.
28
+ *
29
+ * @param Coupon $salesRuleCoupon
28
30
*/
29
31
public function __construct (
30
32
Coupon $ salesRuleCoupon
31
33
) {
32
34
$ this ->salesRuleCoupon = $ salesRuleCoupon ;
33
35
}
34
36
37
+ /**
38
+ * Validate coupon code length with quantity
39
+ *
40
+ * @param array $couponCodeDataArray
41
+ * @return int
42
+ */
35
43
public function validateCouponCodeLengthWithQuantity (array $ couponCodeDataArray ): int
36
44
{
37
45
$ maxProbability = Massgenerator::MAX_PROBABILITY_OF_GUESSING ;
You can’t perform that action at this time.
0 commit comments