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

Move make-sure-single-set out of shared function #21062

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Aug 8, 2021

Overview

3 places in the code call this - in 2 _single is declared on the class as false
& hence don't need this - ergo it is only being done for the one remaining place
so it's not shared it's just a helper for that code & we should return it

Before

2/3 of the non-test places that call this set $_single (I also removed the unused var in the screenshot) so it doesn't make sense in the shared function
image

image

image

After

Out of the shared function, into the class that might need it - that class is not an OOO class or trait so it's harder to tell

Technical Details

Comments

3 places in the code call this - in 2 _single is declared on the class as false
& hence don't need this - ergo it is only being done for the one remaining place
so it's not shared it's just a helper for that code & we should return it
@civibot
Copy link

civibot bot commented Aug 8, 2021

(Standard links)

@seamuslee001
Copy link
Contributor

This seems fine to me merging

@seamuslee001 seamuslee001 merged commit 7deeca8 into civicrm:master Aug 9, 2021
@seamuslee001 seamuslee001 deleted the vars branch August 9, 2021 08:43
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