Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop passing settings into getTaxLabel #23040

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Stop passing settings into getTaxLabel

Before

CRM_Price_BAO_PriceField::getTaxLabel is called from 2 places in the code. In both places the values passed into the function as $displayOpt and $taxTerm are just the settings. In one place these are only retrieved to be passed into this function

public static function getTaxLabel($opt, $valueFieldName, $displayOpt, $taxTerm, $currency = NULL) {

After

Settings don't need to be passed around.... removed from the function signature

Technical Details

Comments

@civibot
Copy link

civibot bot commented Mar 25, 2022

(Standard links)

@civibot civibot bot added the master label Mar 25, 2022
@colemanw
Copy link
Member

colemanw commented Apr 6, 2022

Agreed, there's no reason to pass global settings into a function. It can look them up itself.

@colemanw colemanw merged commit 66a5e28 into civicrm:master Apr 6, 2022
@colemanw colemanw deleted the display_opt branch April 6, 2022 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants