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()
9898 && !$ rule ->getUseAutoGeneration ()) {
9999 $ result ['error ' ] =
100100 __ ('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 ' ] !==
103102 $ this ->validateCouponLengthWithQuantity ->validateCouponCodeLengthWithQuantity (
104103 $ this ->getRequest ()->getParams ()
105104 )
Original file line number Diff line number Diff line change 1717class ValidateCouponLengthWithQuantity implements ValidateCouponLengthWithQuantityInterface
1818{
1919 /**
20- * Sales rule coupon
20+ * Initialize Sales rule coupon property
2121 *
2222 * @var Coupon
2323 */
2424 protected Coupon $ salesRuleCoupon ;
2525
2626 /**
27- * @param Coupon $salesRuleCoupon
27+ * Generate constructor.
28+ *
29+ * @param Coupon $salesRuleCoupon
2830 */
2931 public function __construct (
3032 Coupon $ salesRuleCoupon
3133 ) {
3234 $ this ->salesRuleCoupon = $ salesRuleCoupon ;
3335 }
3436
37+ /**
38+ * Validate coupon code length with quantity
39+ *
40+ * @param array $couponCodeDataArray
41+ * @return int
42+ */
3543 public function validateCouponCodeLengthWithQuantity (array $ couponCodeDataArray ): int
3644 {
3745 $ maxProbability = Massgenerator::MAX_PROBABILITY_OF_GUESSING ;
You can’t perform that action at this time.
0 commit comments