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

dev/core#2823 Make protected functions non-static #21395

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

dev/core#2823 Make protected functions non-static

Before

internal protected functions are static

After

And now they're not

Technical Details

It's really hard to see why this class uses a mix of static & non-static functions
for internal (protected) functions. I suspect history. This makes
them all non-static

Comments

Towards https://lab.civicrm.org/dev/core/-/issues/2823

It's really hard to see why this class uses a mix of static & non-static functions
for internal (protected) functions. I suspect *history*. This makes
them all non-static
@civibot
Copy link

civibot bot commented Sep 7, 2021

(Standard links)

@colemanw
Copy link
Member

colemanw commented Sep 7, 2021

Refactor looks good, looking forward to the next PR in this series.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw re the next PR - I commented on the ticket but I think my underlying assumption is 'it would be OK to load all rows in the managed table into an array on the class, since I don't think there will be that many' - do you agree?

@colemanw
Copy link
Member

colemanw commented Sep 7, 2021

Yes I agree. PHP can easily handle arrays of a few hundred or even a few thousand items, not that I think there would ever be that many.

@eileenmcnaughton eileenmcnaughton merged commit 13b45ac into civicrm:master Sep 8, 2021
@eileenmcnaughton eileenmcnaughton deleted the mgd branch September 8, 2021 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants