Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 15, 2022

PHP 8.1 introduced a new callback declaration syntax, called "first class callables". This syntax can be easily confused with a function call.

While it remains the responsibility of individual sniffs to verify if something is a function call before passing it to any of the PassedParameters methods, a little defensive coding to prevent incorrect results goes a long way.

Includes tests.

Refs:

…for first class callable declarations

PHP 8.1 introduced a new callback declaration syntax, called "first class callables".
This syntax can be easily confused with a function call.

While it remains the responsibility of individual sniffs to verify if something is a function call before passing it to any of the `PassedParameters` methods, a little defensive coding to prevent incorrect results goes a long way.

Includes tests.

Refs:
* https://wiki.php.net/rfc/first_class_callable_syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants