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

Can disallow control structures like else, elseif, goto #257

Merged
merged 1 commit into from
May 4, 2024

Conversation

spaze
Copy link
Owner

@spaze spaze commented May 4, 2024

Checking params inside ( ... ) doesn't work at the moment, so you can disallow all declare()s but can't re-allow e.g. declare(strict-types = 1).

If you try to disallow else if with the space, an exception will be thrown, because else if is parsed as else followed by if, so disallowing else if with the space wouldn't have the desired effect and the result would be unexpected.

Close #68

@spaze spaze self-assigned this May 4, 2024
Checking params inside ( ... ) doesn't work at the moment, so you can disallow all `declare()`s but can't re-allow e.g. `declare(strict-types = 1)`.

Close #68
@spaze spaze force-pushed the spaze/control-structures branch from 10805c4 to 5b5bef6 Compare May 4, 2024 16:56
@spaze spaze merged commit d58806c into main May 4, 2024
74 checks passed
@spaze spaze deleted the spaze/control-structures branch May 4, 2024 16:59
@spaze spaze mentioned this pull request May 4, 2024
@spaze
Copy link
Owner Author

spaze commented May 4, 2024

Released in 3.3.0 now.

@spaze spaze mentioned this pull request Jul 20, 2024
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.

Disabling Else / Elseif
1 participant