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

Switch to non-static functions #19164

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Switch to non-static functions

Before

Functions used only by the form objects are static - this appears to be in order to use them from formRule

After

Functions non-static. Form rule calls them on the form object it was passed. Note this is rather more powerful as it can potentially access & set properties. This means that a property may not need to be fetched as many times

Technical Details

I realise these functions are static so that the formRule can call them - but
the formRule has access to the form object and the intention was obviously always
that the formRule can call functions on the form. This cleans that up:

Comments

I realise these functions are static so that the formRule can call them - but
the formRule has access to the form object and the intention was obviously always
that the formRule can call functions on the form. This cleans that up:
@civibot
Copy link

civibot bot commented Dec 10, 2020

(Standard links)

@civibot civibot bot added the master label Dec 10, 2020
@eileenmcnaughton
Copy link
Contributor Author

test this please

@demeritcowboy
Copy link
Contributor

I was just looking at this. Agree the fail seemed like a glitch.

r-run: Did a quick run. Had some weirdnesses but I don't think it's related to the PR. Otherwise ok.
r-code: I think the ?array is ok since php 7.1 is the minimum supported.

Looks good.

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 - this has review by @demeritcowboy (thanks @demeritcowboy !)

@seamuslee001 seamuslee001 merged commit 10e91f0 into civicrm:master Dec 11, 2020
@seamuslee001 seamuslee001 deleted the member branch December 11, 2020 03:32
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.

3 participants