Skip to content

Commit

Permalink
renamed method to be more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
GytisZum committed Oct 17, 2023
1 parent de0b883 commit 1987714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/PriceRuleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function applyPriceRuleForCarrier(Cart $cart, $priceRulesIds, $shopId)
}

foreach ($priceRulesIds as $priceRuleId) {
if (!$this->doesCarrierHavePriceRule($priceRuleId, $availablePriceRules)) {
if (!$this->ensureCarrierHasPriceRule($priceRuleId, $availablePriceRules)) {
return false;
}

Expand Down Expand Up @@ -439,7 +439,7 @@ private function duplicatePriceRuleTablesData($tables, $priceRuleTablesData, $ne
* @param array|false $availablePriceRules
* @return bool
*/
private function doesCarrierHavePriceRule($priceRuleId, $availablePriceRules)
private function ensureCarrierHasPriceRule($priceRuleId, $availablePriceRules)
{
foreach ($availablePriceRules as $rule) {
if (isset($rule['id_dpd_price_rule']) && (int) $rule['id_dpd_price_rule'] === (int) $priceRuleId) {
Expand Down

0 comments on commit 1987714

Please sign in to comment.