Skip to content

Commit a1de10d

Browse files
authored
ENGCOM-3730: Refactoring in Magento_SalesRule #19929
2 parents fc809a6 + 185e6af commit a1de10d

File tree

15 files changed

+12
-29
lines changed

15 files changed

+12
-29
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
namespace Magento\SalesRule\Controller\Adminhtml\Promo\Quote;
88

9-
use Magento\Framework\App\ObjectManager;
109
use Magento\SalesRule\Model\CouponGenerator;
1110

1211
class Generate extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote

app/code/Magento/SalesRule/Model/CouponRepository.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
use Magento\Framework\Api\Search\FilterGroup;
1010
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
11-
use Magento\Framework\Api\SortOrder;
1211
use Magento\SalesRule\Model\ResourceModel\Coupon\Collection;
1312

1413
/**
@@ -197,13 +196,13 @@ public function deleteById($couponId)
197196
/**
198197
* Helper function that adds a FilterGroup to the collection.
199198
*
200-
* @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
199+
* @param FilterGroup $filterGroup
201200
* @param Collection $collection
202201
* @deprecated 100.2.0
203202
* @return void
204203
*/
205204
protected function addFilterGroupToCollection(
206-
\Magento\Framework\Api\Search\FilterGroup $filterGroup,
205+
FilterGroup $filterGroup,
207206
Collection $collection
208207
) {
209208
$fields = [];

app/code/Magento/SalesRule/Model/Data/Rule.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
1717
* @codeCoverageIgnore
1818
*/
19-
class Rule extends \Magento\Framework\Api\AbstractExtensibleObject implements
20-
\Magento\SalesRule\Api\Data\RuleInterface
19+
class Rule extends \Magento\Framework\Api\AbstractExtensibleObject implements RuleInterface
2120
{
2221
const KEY_RULE_ID = 'rule_id';
2322
const KEY_NAME = 'name';

app/code/Magento/SalesRule/Model/Plugin/QuoteConfigProductAttributes.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\SalesRule\Model\Plugin;
77

8-
use Magento\Store\Model\StoreManagerInterface;
9-
use Magento\Customer\Model\Session;
108
use Magento\SalesRule\Model\ResourceModel\Rule as RuleResource;
119

1210
class QuoteConfigProductAttributes

app/code/Magento/SalesRule/Model/ResourceModel/ReadHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\SalesRule\Model\ResourceModel;
77

8-
use Magento\SalesRule\Model\ResourceModel\Rule;
98
use Magento\Framework\EntityManager\MetadataPool;
109
use Magento\Framework\EntityManager\Operation\AttributeInterface;
1110

app/code/Magento/SalesRule/Model/ResourceModel/SaveHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\SalesRule\Model\ResourceModel;
77

8-
use Magento\SalesRule\Model\ResourceModel\Rule;
98
use Magento\Framework\EntityManager\MetadataPool;
109
use Magento\Framework\EntityManager\Operation\AttributeInterface;
1110

app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\SalesRule\Model\Rule\Action\Discount;
77

8-
use Magento\Framework\App\ObjectManager;
98
use Magento\Framework\Pricing\PriceCurrencyInterface;
109
use Magento\SalesRule\Model\DeltaPriceRound;
1110
use Magento\SalesRule\Model\Validator;

app/code/Magento/SalesRule/Model/Rule/Metadata/ValueProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\SalesRule\Model\Rule\Metadata;
77

8-
use Magento\SalesRule\Model\ResourceModel\Rule\Collection;
98
use Magento\SalesRule\Model\Rule;
109
use Magento\Store\Model\System\Store;
1110
use Magento\Customer\Api\GroupRepositoryInterface;

app/code/Magento/SalesRule/Model/RuleRepository.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\Framework\Api\Search\FilterGroup;
99
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
1010
use Magento\Framework\Api\SearchCriteriaInterface;
11-
use Magento\Framework\Api\SortOrder;
1211
use Magento\SalesRule\Model\ResourceModel\Rule\Collection;
1312

1413
/**
@@ -183,13 +182,13 @@ public function deleteById($id)
183182
/**
184183
* Helper function that adds a FilterGroup to the collection.
185184
*
186-
* @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
185+
* @param FilterGroup $filterGroup
187186
* @param Collection $collection
188187
* @deprecated 100.2.0
189188
* @return void
190189
*/
191190
protected function addFilterGroupToCollection(
192-
\Magento\Framework\Api\Search\FilterGroup $filterGroup,
191+
FilterGroup $filterGroup,
193192
Collection $collection
194193
) {
195194
$fields = [];

app/code/Magento/SalesRule/Setup/Patch/Data/ConvertSerializedDataToJson.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Magento\SalesRule\Setup\Patch\Data;
88

9-
use Magento\Framework\App\ResourceConnection;
109
use Magento\Framework\Setup\Patch\DataPatchInterface;
1110
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1211

0 commit comments

Comments
 (0)