15
15
*
16
16
* @author Magento Core Team <[email protected] >
17
17
* @since 100.0.2
18
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18
19
*/
19
20
class Rating extends \Magento \Framework \Model \ResourceModel \Db \AbstractDb
20
21
{
@@ -43,13 +44,13 @@ class Rating extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
43
44
private $ scopeConfig ;
44
45
45
46
/**
46
- * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
47
- * @param \Psr\Log\LoggerInterface $logger
48
- * @param \Magento\Framework\Module\Manager $moduleManager
49
- * @param \Magento\Store\Model\StoreManagerInterface $storeManager
50
- * @param \Magento\Review\Model\ResourceModel\ Review\Summary $reviewSummary
51
- * @param string $connectionName
52
- * @param ScopeConfigInterface|null $scopeConfig
47
+ * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
48
+ * @param \Psr\Log\LoggerInterface $logger
49
+ * @param \Magento\Framework\Module\Manager $moduleManager
50
+ * @param \Magento\Store\Model\StoreManagerInterface $storeManager
51
+ * @param Review\Summary $reviewSummary
52
+ * @param string $connectionName
53
+ * @param ScopeConfigInterface|null $scopeConfig
53
54
*/
54
55
public function __construct (
55
56
\Magento \Framework \Model \ResourceModel \Db \Context $ context ,
@@ -189,6 +190,8 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
189
190
}
190
191
191
192
/**
193
+ * Process rating codes.
194
+ *
192
195
* @param \Magento\Framework\Model\AbstractModel $object
193
196
* @return $this
194
197
*/
@@ -212,6 +215,8 @@ protected function processRatingCodes(\Magento\Framework\Model\AbstractModel $ob
212
215
}
213
216
214
217
/**
218
+ * Process rating stores.
219
+ *
215
220
* @param \Magento\Framework\Model\AbstractModel $object
216
221
* @return $this
217
222
*/
@@ -235,6 +240,8 @@ protected function processRatingStores(\Magento\Framework\Model\AbstractModel $o
235
240
}
236
241
237
242
/**
243
+ * Delete rating data.
244
+ *
238
245
* @param int $ratingId
239
246
* @param string $table
240
247
* @param array $storeIds
@@ -258,6 +265,8 @@ protected function deleteRatingData($ratingId, $table, array $storeIds)
258
265
}
259
266
260
267
/**
268
+ * Insert rating data.
269
+ *
261
270
* @param string $table
262
271
* @param array $data
263
272
* @return void
@@ -280,6 +289,7 @@ protected function insertRatingData($table, array $data)
280
289
281
290
/**
282
291
* Perform actions after object delete
292
+ *
283
293
* Prepare rating data for reaggregate all data for reviews
284
294
*
285
295
* @param \Magento\Framework\Model\AbstractModel $object
@@ -290,7 +300,7 @@ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
290
300
parent ::_afterDelete ($ object );
291
301
if (!$ this ->moduleManager ->isEnabled ('Magento_Review ' ) &&
292
302
!$ this ->scopeConfig ->getValue (
293
- \Magento \Review \Observer \PredispatchReviewObserver::XML_PATH_REVIEW_ACTIVE ,
303
+ \Magento \Review \Observer \PredispatchReviewObserver::XML_PATH_REVIEW_ACTIVE ,
294
304
\Magento \Store \Model \ScopeInterface::SCOPE_STORE
295
305
)
296
306
) {
0 commit comments