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 invariable variables to private function #25676

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 27, 2023

Overview

Stop passing invariable variables to private function

Before

This previously shared function is called from 2 places. In both cases there are a number of hard-coded variables that are the same

image

After

Hard-coding moved to within function (most of them could be fully removed but I've excluded that change to keep the PR readable & focus on the inputs of the function). Handling for invalid permissions value removed as it is now always valid

image

Technical Details

Comments

@civibot
Copy link

civibot bot commented Feb 27, 2023

(Standard links)

@civibot civibot bot added the master label Feb 27, 2023
@colemanw
Copy link
Member

colemanw commented Mar 7, 2023

This looks good and I see more cleanup can be done now that the variables never change.

@colemanw colemanw merged commit 82e25c6 into civicrm:master Mar 7, 2023
@colemanw colemanw deleted the cust_it branch March 7, 2023 01:38
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Mar 7, 2023
These were established as unchanging here
civicrm#25676
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