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

Use custom logic for finding arrow function scope #296

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

sirbrillig
Copy link
Owner

It appears that at least in some versions of phpcs, the arrow function scope detection is not correct. It incorrectly considers a closing square bracket (]) inside the body of an arrow function to close that arrow function's scope.

We already have custom logic for finding arrow function scopes so that it will work for versions of PHP/phpcs which do not support arrow functions. In this PR we remove the simpler path and rely only on the custom logic.

Fixes #295

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.

Unused function parameter in lambda function
1 participant