Skip to content

current()#3

Open
mikedevelops wants to merge 12 commits into
masterfrom
experimental-array-current
Open

current()#3
mikedevelops wants to merge 12 commits into
masterfrom
experimental-array-current

Conversation

@mikedevelops

Copy link
Copy Markdown

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

asmblah commented Mar 21, 2018

Copy link
Copy Markdown
Contributor

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

asmblah commented Mar 21, 2018

Copy link
Copy Markdown
Contributor

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