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

current() #3

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

current() #3

wants to merge 12 commits into from

Conversation

mikedevelops
Copy link
Collaborator

Added docblock, argument warnings and tests.

I noticed in the docs an object can also be passed into current, not sure if we want to cover this?

current((object) array('one', 'two')); //  one 

@asmblah
Copy link
Contributor

asmblah commented Mar 21, 2018

Thanks very much again @mikedevelops ! Yeah, I guess we should cover objects too - ObjectValue should support most of the array-access methods already but I think you'd need to add a .getCurrentElement(...) method to ObjectValue like the one in ArrayValue

@asmblah
Copy link
Contributor

asmblah commented Mar 21, 2018

Do you think it would be worth adding some integration test(s) too? Probably overkill to add one for each of these array iteration functions, but we could add one that uses current(), next() and end() together

Base automatically changed from experimental to master June 16, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants