-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Squiz.Commenting.FunctionComment false positive when function contains closure #1550
Comments
The same issue we have also in case: function test()
{
new class() {
public function test() {
return;
}
};
return [];
} @josephzidell Here is my PR with fix for both cases: #1551 |
Thanks for coming up with a fix so quickly |
@webimpress Found another, related issue Code: /**
* Test function
*
* @return void
*/
public function test()
{
function () {
return 4;
};
} Error: |
@josephzidell I've added more tests 4a28555 It seems that my previous solution also covers these cases. |
👍 |
…n function contains closure (ref #1551)
This has now been fixed. Thanks a lot for reporting this. |
There is a false positive in
src\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff.php
This code throws error:
Function return type is not void, but function is returning void here
The text was updated successfully, but these errors were encountered: