-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
[REF] Simplify membership status date handling #18030
Conversation
We have a test error coming out of this code. I find it unreadable - I think this would help.... There are some obvious next steps if this is all good
(Standard links)
|
I've seen this error popping up on a few PRs:
|
@eileenmcnaughton I realise from your comment that the test error is probably the one you mention in the description.. Marking concept approved but would appreciate someone else taking a quick look before (and ideally |
I'll give it a go. This looks where |
General note: it's hard to follow what the nested foreach is doing because it ends up overwriting any previous calculation it did of $startEvent and $endEvent, but that seems to be the algorithm. So it would be good to add a comment in somewhere about what the algorithm is, which seems something like:
Beyond that I think this is an ok replacement, because:
Asides:
I did click on some things but mostly ran this by putting in some debug output in the code and calling So I'd say this PR is (Ok to merge) |
@demeritcowboy variable variable loops hurt my brain in places where I didn't even know I had brain. I was thinking about following this up with a next baby step - but maybe you would like to & I can bruise my brain on that - since you seem to have thought through the obvious follow up with looks to be summarised as
|
test this please |
Tests passing - merging based on @demeritcowboy review |
Overview
Reduce use of variable variables
Before
Variable variables not only for each but each part of each date
After
Use date function on the date variable, not aa variable variable
Technical Details
We have a test error coming out of this code. I find it unreadable - I think this would help....
There are some obvious next steps if this is all good
Comments