@@ -102,32 +102,32 @@ class IndexBuilder
102
102
protected $ connection ;
103
103
104
104
/**
105
- * @var \Magento\CatalogRule\Model\Indexer\ ProductPriceCalculator
105
+ * @var ProductPriceCalculator
106
106
*/
107
107
private $ productPriceCalculator ;
108
108
109
109
/**
110
- * @var \Magento\CatalogRule\Model\Indexer\ ReindexRuleProduct
110
+ * @var ReindexRuleProduct
111
111
*/
112
112
private $ reindexRuleProduct ;
113
113
114
114
/**
115
- * @var \Magento\CatalogRule\Model\Indexer\ ReindexRuleGroupWebsite
115
+ * @var ReindexRuleGroupWebsite
116
116
*/
117
117
private $ reindexRuleGroupWebsite ;
118
118
119
119
/**
120
- * @var \Magento\CatalogRule\Model\Indexer\ RuleProductsSelectBuilder
120
+ * @var RuleProductsSelectBuilder
121
121
*/
122
122
private $ ruleProductsSelectBuilder ;
123
123
124
124
/**
125
- * @var \Magento\CatalogRule\Model\Indexer\ ReindexRuleProductPrice
125
+ * @var ReindexRuleProductPrice
126
126
*/
127
127
private $ reindexRuleProductPrice ;
128
128
129
129
/**
130
- * @var \Magento\CatalogRule\Model\Indexer\ RuleProductPricesPersistor
130
+ * @var RuleProductPricesPersistor
131
131
*/
132
132
private $ pricesPersistor ;
133
133
@@ -152,16 +152,15 @@ class IndexBuilder
152
152
* @param \Magento\Framework\Stdlib\DateTime\DateTime $dateTime
153
153
* @param \Magento\Catalog\Model\ProductFactory $productFactory
154
154
* @param int $batchCount
155
- * @param \Magento\CatalogRule\Model\Indexer\ ProductPriceCalculator|null $productPriceCalculator
156
- * @param \Magento\CatalogRule\Model\Indexer\ ReindexRuleProduct|null $reindexRuleProduct
157
- * @param \Magento\CatalogRule\Model\Indexer\ ReindexRuleGroupWebsite|null $reindexRuleGroupWebsite
158
- * @param \Magento\CatalogRule\Model\Indexer\ RuleProductsSelectBuilder|null $ruleProductsSelectBuilder
159
- * @param \Magento\CatalogRule\Model\Indexer\ ReindexRuleProductPrice|null $reindexRuleProductPrice
160
- * @param \Magento\CatalogRule\Model\Indexer\ RuleProductPricesPersistor|null $pricesPersistor
155
+ * @param ProductPriceCalculator|null $productPriceCalculator
156
+ * @param ReindexRuleProduct|null $reindexRuleProduct
157
+ * @param ReindexRuleGroupWebsite|null $reindexRuleGroupWebsite
158
+ * @param RuleProductsSelectBuilder|null $ruleProductsSelectBuilder
159
+ * @param ReindexRuleProductPrice|null $reindexRuleProductPrice
160
+ * @param RuleProductPricesPersistor|null $pricesPersistor
161
161
* @param \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher|null $activeTableSwitcher
162
162
* @param ProductLoader|null $productLoader
163
163
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
164
- * @SuppressWarnings(PHPMD.NPathComplexity)
165
164
*/
166
165
public function __construct (
167
166
RuleCollectionFactory $ ruleCollectionFactory ,
@@ -174,12 +173,12 @@ public function __construct(
174
173
\Magento \Framework \Stdlib \DateTime \DateTime $ dateTime ,
175
174
\Magento \Catalog \Model \ProductFactory $ productFactory ,
176
175
$ batchCount = 1000 ,
177
- \ Magento \ CatalogRule \ Model \ Indexer \ ProductPriceCalculator $ productPriceCalculator = null ,
178
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleProduct $ reindexRuleProduct = null ,
179
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleGroupWebsite $ reindexRuleGroupWebsite = null ,
180
- \ Magento \ CatalogRule \ Model \ Indexer \ RuleProductsSelectBuilder $ ruleProductsSelectBuilder = null ,
181
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleProductPrice $ reindexRuleProductPrice = null ,
182
- \ Magento \ CatalogRule \ Model \ Indexer \ RuleProductPricesPersistor $ pricesPersistor = null ,
176
+ ProductPriceCalculator $ productPriceCalculator = null ,
177
+ ReindexRuleProduct $ reindexRuleProduct = null ,
178
+ ReindexRuleGroupWebsite $ reindexRuleGroupWebsite = null ,
179
+ RuleProductsSelectBuilder $ ruleProductsSelectBuilder = null ,
180
+ ReindexRuleProductPrice $ reindexRuleProductPrice = null ,
181
+ RuleProductPricesPersistor $ pricesPersistor = null ,
183
182
\Magento \Catalog \Model \ResourceModel \Indexer \ActiveTableSwitcher $ activeTableSwitcher = null ,
184
183
ProductLoader $ productLoader = null
185
184
) {
@@ -195,29 +194,30 @@ public function __construct(
195
194
$ this ->productFactory = $ productFactory ;
196
195
$ this ->batchCount = $ batchCount ;
197
196
198
- $ this ->productPriceCalculator = $ productPriceCalculator ?: ObjectManager::getInstance ()->get (
199
- \ Magento \ CatalogRule \ Model \ Indexer \ ProductPriceCalculator::class
197
+ $ this ->productPriceCalculator = $ productPriceCalculator ?? ObjectManager::getInstance ()->get (
198
+ ProductPriceCalculator::class
200
199
);
201
- $ this ->reindexRuleProduct = $ reindexRuleProduct ?: ObjectManager::getInstance ()->get (
202
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleProduct::class
200
+ $ this ->reindexRuleProduct = $ reindexRuleProduct ?? ObjectManager::getInstance ()->get (
201
+ ReindexRuleProduct::class
203
202
);
204
- $ this ->reindexRuleGroupWebsite = $ reindexRuleGroupWebsite ?: ObjectManager::getInstance ()->get (
205
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleGroupWebsite::class
203
+ $ this ->reindexRuleGroupWebsite = $ reindexRuleGroupWebsite ?? ObjectManager::getInstance ()->get (
204
+ ReindexRuleGroupWebsite::class
206
205
);
207
- $ this ->ruleProductsSelectBuilder = $ ruleProductsSelectBuilder ?: ObjectManager::getInstance ()->get (
208
- \ Magento \ CatalogRule \ Model \ Indexer \ RuleProductsSelectBuilder::class
206
+ $ this ->ruleProductsSelectBuilder = $ ruleProductsSelectBuilder ?? ObjectManager::getInstance ()->get (
207
+ RuleProductsSelectBuilder::class
209
208
);
210
- $ this ->reindexRuleProductPrice = $ reindexRuleProductPrice ?: ObjectManager::getInstance ()->get (
211
- \ Magento \ CatalogRule \ Model \ Indexer \ ReindexRuleProductPrice::class
209
+ $ this ->reindexRuleProductPrice = $ reindexRuleProductPrice ?? ObjectManager::getInstance ()->get (
210
+ ReindexRuleProductPrice::class
212
211
);
213
- $ this ->pricesPersistor = $ pricesPersistor ?: ObjectManager::getInstance ()->get (
214
- \ Magento \ CatalogRule \ Model \ Indexer \ RuleProductPricesPersistor::class
212
+ $ this ->pricesPersistor = $ pricesPersistor ?? ObjectManager::getInstance ()->get (
213
+ RuleProductPricesPersistor::class
215
214
);
216
- $ this ->activeTableSwitcher = $ activeTableSwitcher ?: ObjectManager::getInstance ()->get (
215
+ $ this ->activeTableSwitcher = $ activeTableSwitcher ?? ObjectManager::getInstance ()->get (
217
216
\Magento \Catalog \Model \ResourceModel \Indexer \ActiveTableSwitcher::class
218
217
);
219
- $ this ->productLoader = $ productLoader ?:
220
- ObjectManager::getInstance ()->get (ProductLoader::class);
218
+ $ this ->productLoader = $ productLoader ?? ObjectManager::getInstance ()->get (
219
+ ProductLoader::class
220
+ );
221
221
}
222
222
223
223
/**
@@ -432,7 +432,7 @@ protected function getTable($tableName)
432
432
* @param Rule $rule
433
433
* @return $this
434
434
* @deprecated 100.2.0
435
- * @see \Magento\CatalogRule\Model\Indexer\ ReindexRuleProduct::execute
435
+ * @see ReindexRuleProduct::execute
436
436
*/
437
437
protected function updateRuleProductData (Rule $ rule )
438
438
{
@@ -458,8 +458,8 @@ protected function updateRuleProductData(Rule $rule)
458
458
* @throws \Exception
459
459
* @return $this
460
460
* @deprecated 100.2.0
461
- * @see \Magento\CatalogRule\Model\Indexer\ ReindexRuleProductPrice::execute
462
- * @see \Magento\CatalogRule\Model\Indexer\ ReindexRuleGroupWebsite::execute
461
+ * @see ReindexRuleProductPrice::execute
462
+ * @see ReindexRuleGroupWebsite::execute
463
463
*/
464
464
protected function applyAllRules (Product $ product = null )
465
465
{
@@ -473,7 +473,7 @@ protected function applyAllRules(Product $product = null)
473
473
*
474
474
* @return $this
475
475
* @deprecated 100.2.0
476
- * @see \Magento\CatalogRule\Model\Indexer\ ReindexRuleGroupWebsite::execute
476
+ * @see ReindexRuleGroupWebsite::execute
477
477
*/
478
478
protected function updateCatalogRuleGroupWebsiteData ()
479
479
{
@@ -497,7 +497,7 @@ protected function deleteOldData()
497
497
* @param null $productData
498
498
* @return float
499
499
* @deprecated 100.2.0
500
- * @see \Magento\CatalogRule\Model\Indexer\ ProductPriceCalculator::calculate
500
+ * @see ProductPriceCalculator::calculate
501
501
*/
502
502
protected function calcRuleProductPrice ($ ruleData , $ productData = null )
503
503
{
@@ -510,7 +510,7 @@ protected function calcRuleProductPrice($ruleData, $productData = null)
510
510
* @return \Zend_Db_Statement_Interface
511
511
* @throws \Magento\Framework\Exception\LocalizedException
512
512
* @deprecated 100.2.0
513
- * @see \Magento\CatalogRule\Model\Indexer\ RuleProductsSelectBuilder::build
513
+ * @see RuleProductsSelectBuilder::build
514
514
*/
515
515
protected function getRuleProductsStmt ($ websiteId , Product $ product = null )
516
516
{
@@ -522,7 +522,7 @@ protected function getRuleProductsStmt($websiteId, Product $product = null)
522
522
* @return $this
523
523
* @throws \Exception
524
524
* @deprecated 100.2.0
525
- * @see \Magento\CatalogRule\Model\Indexer\ RuleProductPricesPersistor::execute
525
+ * @see RuleProductPricesPersistor::execute
526
526
*/
527
527
protected function saveRuleProductPrices ($ arrData )
528
528
{
0 commit comments