@@ -45,15 +45,15 @@ public function __construct(
45
45
/**
46
46
* Calculate EAV attributes size
47
47
*
48
- * @param ChangelogInterface $changelog
48
+ * @param ChangelogInterface $changelogData
49
49
* @return int
50
50
* @throws \Exception
51
51
*/
52
- private function calculateEavAttributeSize (ChangelogInterface $ changelog ): int
52
+ private function calculateEavAttributeSize (ChangelogInterface $ changelogData ): int
53
53
{
54
54
$ connection = $ this ->resourceConnection ->getConnection ();
55
55
56
- if (!isset ($ this ->entityTypeCodes [$ changelog ->getViewId ()])) {
56
+ if (!isset ($ this ->entityTypeCodes [$ changelogData ->getViewId ()])) {
57
57
throw new \Exception ('Entity type for view was not defined ' );
58
58
}
59
59
@@ -66,7 +66,7 @@ private function calculateEavAttributeSize(ChangelogInterface $changelog): int
66
66
['type ' => $ connection ->getTableName ('eav_entity_type ' )],
67
67
'type.entity_type_id=eav_attribute.entity_type_id '
68
68
)
69
- ->where ('type.entity_type_code = ? ' , $ this ->entityTypeCodes [$ changelog ->getViewId ()]);
69
+ ->where ('type.entity_type_code = ? ' , $ this ->entityTypeCodes [$ changelogData ->getViewId ()]);
70
70
71
71
return (int ) $ connection ->fetchOne ($ select );
72
72
}
@@ -92,10 +92,10 @@ private function setGroupConcatMax(int $numberOfAttributes): void
92
92
* @inheritdoc
93
93
* @throws \Exception
94
94
*/
95
- public function walk (ChangelogInterface $ changelog , int $ fromVersionId , int $ toVersion , int $ batchSize )
95
+ public function walk (ChangelogInterface $ changelogData , int $ fromVersionId , int $ toVersion , int $ batchSize )
96
96
{
97
97
$ connection = $ this ->resourceConnection ->getConnection ();
98
- $ numberOfAttributes = $ this ->calculateEavAttributeSize ($ changelog );
98
+ $ numberOfAttributes = $ this ->calculateEavAttributeSize ($ changelogData );
99
99
$ this ->setGroupConcatMax ($ numberOfAttributes );
100
100
$ select = $ connection ->select ()->distinct (true )
101
101
->where (
@@ -106,15 +106,15 @@ public function walk(ChangelogInterface $changelog, int $fromVersionId, int $toV
106
106
'version_id <= ? ' ,
107
107
$ toVersion
108
108
)
109
- ->group ([$ changelog ->getColumnName (), 'store_id ' ])
109
+ ->group ([$ changelogData ->getColumnName (), 'store_id ' ])
110
110
->limit ($ batchSize );
111
111
112
112
$ columns = [
113
- $ changelog ->getColumnName (),
113
+ $ changelogData ->getColumnName (),
114
114
'attribute_ids ' => new Expression ('GROUP_CONCAT(attribute_id) ' ),
115
115
'store_id '
116
116
];
117
- $ select ->from ($ changelog ->getName (), $ columns );
117
+ $ select ->from ($ changelogData ->getName (), $ columns );
118
118
return $ connection ->fetchAll ($ select );
119
119
}
120
120
}
0 commit comments