@@ -120,20 +120,20 @@ function () use ($productId, $context) {
120
120
121
121
$ productPrice = $ this ->tiers ->getProductRegularPrice ($ productId ) ?? 0.0 ;
122
122
$ tierPrices = $ this ->tiers ->getProductTierPrices ($ productId ) ?? [];
123
- return $ this ->filterAndFormatProductTierPrices ($ tierPrices , $ productPrice , $ store );
123
+ return $ this ->formatAndFilterTierPrices ($ tierPrices , $ productPrice , $ store );
124
124
}
125
125
);
126
126
}
127
127
128
128
/**
129
- * Filter and format tier prices for output
129
+ * Format and filter tier prices for output
130
130
*
131
131
* @param ProductTierPriceInterface[] $tierPrices
132
132
* @param float $productPrice
133
133
* @param StoreInterface $store
134
134
* @return array
135
135
*/
136
- private function filterAndFormatProductTierPrices (
136
+ private function formatAndFilterTierPrices (
137
137
array $ tierPrices ,
138
138
float $ productPrice ,
139
139
StoreInterface $ store
@@ -142,7 +142,7 @@ private function filterAndFormatProductTierPrices(
142
142
$ qtyCache = [];
143
143
144
144
foreach ($ tierPrices as $ key => $ tierPrice ) {
145
- $ this ->formatProductTierPrices ($ productPrice , $ store , $ tierPrice , $ tiers );
145
+ $ this ->formatTierPrices ($ productPrice , $ store , $ tierPrice , $ tiers );
146
146
$ this ->filterTierPrices ($ tierPrices , $ key , $ tierPrice , $ qtyCache , $ tiers );
147
147
}
148
148
return $ tiers ;
@@ -156,7 +156,7 @@ private function filterAndFormatProductTierPrices(
156
156
* @param ProductTierPriceInterface $tierPrice
157
157
* @param array $tiers
158
158
*/
159
- private function formatProductTierPrices (float $ productPrice , StoreInterface $ store , &$ tierPrice , &$ tiers )
159
+ private function formatTierPrices (float $ productPrice , StoreInterface $ store , &$ tierPrice , &$ tiers )
160
160
{
161
161
$ tierPrice ->setValue ($ this ->priceCurrency ->convertAndRound ($ tierPrice ->getValue ()));
162
162
$ percentValue = $ tierPrice ->getExtensionAttributes ()->getPercentageValue ();
0 commit comments