-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BCFile/FunctionDeclarations::get[Method]Properties(): bug fix - skip …
…over closure use statements Sister-PR to upstream PR PHPCSStandards/PHP_CodeSniffer 421 The short of it is that the `File::getMethodProperties()` method previously did not skip over closure `use` statements when walking the tokens to find the return type. As closure `use` statements can only contain variables, the only tokens which could be encountered in a closure `use` statement, which could also be encountered in a return type declaration are the `T_STRING`, `T_SELF`, `T_PARENT` and the `T_STATIC` tokens in the case when the variable being imported is a class property, i.e. the property name part of `$this->name` or `self` in `self::$name`. Either way, this patch fixes the issue. Includes unit tests.
- Loading branch information
Showing
4 changed files
with
323 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters