Skip to content

Commit 7d3d9c9

Browse files
author
lykhachov
committed
replace changelog to changelogData
1 parent 2fbfb1f commit 7d3d9c9

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

app/code/Magento/Eav/Model/Mview/ChangeLogBatchWalker.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ public function __construct(
4545
/**
4646
* Calculate EAV attributes size
4747
*
48-
* @param ChangelogInterface $changelog
48+
* @param ChangelogInterface $changelogData
4949
* @return int
5050
* @throws \Exception
5151
*/
52-
private function calculateEavAttributeSize(ChangelogInterface $changelog): int
52+
private function calculateEavAttributeSize(ChangelogInterface $changelogData): int
5353
{
5454
$connection = $this->resourceConnection->getConnection();
5555

56-
if (!isset($this->entityTypeCodes[$changelog->getViewId()])) {
56+
if (!isset($this->entityTypeCodes[$changelogData->getViewId()])) {
5757
throw new \Exception('Entity type for view was not defined');
5858
}
5959

@@ -66,7 +66,7 @@ private function calculateEavAttributeSize(ChangelogInterface $changelog): int
6666
['type' => $connection->getTableName('eav_entity_type')],
6767
'type.entity_type_id=eav_attribute.entity_type_id'
6868
)
69-
->where('type.entity_type_code = ?', $this->entityTypeCodes[$changelog->getViewId()]);
69+
->where('type.entity_type_code = ?', $this->entityTypeCodes[$changelogData->getViewId()]);
7070

7171
return (int) $connection->fetchOne($select);
7272
}
@@ -92,10 +92,10 @@ private function setGroupConcatMax(int $numberOfAttributes): void
9292
* @inheritdoc
9393
* @throws \Exception
9494
*/
95-
public function walk(ChangelogInterface $changelog, int $fromVersionId, int $toVersion, int $batchSize)
95+
public function walk(ChangelogInterface $changelogData, int $fromVersionId, int $toVersion, int $batchSize)
9696
{
9797
$connection = $this->resourceConnection->getConnection();
98-
$numberOfAttributes = $this->calculateEavAttributeSize($changelog);
98+
$numberOfAttributes = $this->calculateEavAttributeSize($changelogData);
9999
$this->setGroupConcatMax($numberOfAttributes);
100100
$select = $connection->select()->distinct(true)
101101
->where(
@@ -106,15 +106,15 @@ public function walk(ChangelogInterface $changelog, int $fromVersionId, int $toV
106106
'version_id <= ?',
107107
$toVersion
108108
)
109-
->group([$changelog->getColumnName(), 'store_id'])
109+
->group([$changelogData->getColumnName(), 'store_id'])
110110
->limit($batchSize);
111111

112112
$columns = [
113-
$changelog->getColumnName(),
113+
$changelogData->getColumnName(),
114114
'attribute_ids' => new Expression('GROUP_CONCAT(attribute_id)'),
115115
'store_id'
116116
];
117-
$select->from($changelog->getName(), $columns);
117+
$select->from($changelogData->getName(), $columns);
118118
return $connection->fetchAll($select);
119119
}
120120
}

dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,5 @@
7373
<path>app/design/adminhtml/Magento/backend/Magento_Rma/web/css/source/_module.less</path>
7474
<word>rma</word>
7575
</item>
76-
<item>
77-
<path>app/code/Magento/Eav/Model/Mview/ChangeLogBatchWalker.php</path>
78-
<word>changelog</word>
79-
</item>
8076
</whitelist>
8177
</config>

0 commit comments

Comments
 (0)