Skip to content

Commit 479be79

Browse files
faraz-glsreenia806
authored andcommitted
AC-8753: Coupon quantity generation checks
* Moved constant to top
1 parent 76da82f commit 479be79

File tree

1 file changed

+6
-6
lines changed
  • app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote

1 file changed

+6
-6
lines changed

app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Generate.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
*/
3636
class Generate extends Quote implements HttpPostActionInterface
3737
{
38+
/**
39+
* Coupon quantity limit config path
40+
*/
41+
private const XML_CONFIG_COUPON_QUANTITY_LIMIT = 'promo/auto_generated_coupon_codes/quantity_limit';
42+
3843
/**
3944
* @var CouponGenerator
4045
*/
@@ -60,11 +65,6 @@ class Generate extends Quote implements HttpPostActionInterface
6065
*/
6166
private ScopeConfigInterface $scopeConfig;
6267

63-
/**
64-
* Coupon quantity limit config path
65-
*/
66-
private const XML_CONFIG_COUPON_QUANTITY_LIMIT = 'promo/auto_generated_coupon_codes/quantity_limit';
67-
6868
/**
6969
* Generate constructor.
7070
* @param Context $context
@@ -180,8 +180,8 @@ public function execute(): void
180180
'Coupon quantity should be less than or equal to the coupon quantity in the store configuration.'
181181
)
182182
);
183-
// @codingStandardsIgnoreEnd
184183
}
184+
// @codingStandardsIgnoreEnd
185185
$this->_view->getLayout()->initMessages();
186186
$result['messages'] = $this->_view->getLayout()->getMessagesBlock()->getGroupedHtml();
187187
} catch (InputException $inputException) {

0 commit comments

Comments
 (0)