Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Incorrect detection of arguments in closures #27

Merged
merged 2 commits into from
Dec 19, 2012
Merged

Incorrect detection of arguments in closures #27

merged 2 commits into from
Dec 19, 2012

Conversation

christeredvartsen
Copy link
Contributor

This PR fixes an issue where PHP_TokenStream does not recognize all parameters in closures. Currently it does not detect both params in the following closure:

$function1 = function($foo, $bar) use ($var) {};

This is because it assumes a function name exists, and skips 3 tokens, and in the above case, the third token is a parameter.

@sebastianbergmann sebastianbergmann merged commit e69d777 into sebastianbergmann:master Dec 19, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants