Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0a1

Bug #19944 docblock squiz sniff "return void" trips over return in lambda function
Submitted: 2013-05-09 09:55 UTC Modified: 2013-05-21 07:07 UTC
From: waldvogel Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version Unknown)
PHP Version: 5.4.4 OS: Debian Sid
Roadmaps: (Not assigned)    
Subscription  


 [2013-05-09 09:55 UTC] waldvogel (wald vogel)
Description: ------------ if I have a method that contains a lambda function like this: function ($e) { return new Event($e); }, this check: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/Co deSniffer/Standards/Squiz/Sniffs/Commenting/FunctionComm entSniff.php#L420 thinks that this is the return statement of the method itself and reports an error for the docblock: * @return void "Function return type is void, but function contains return statement" the method doesn't really contain a return statement though. we're using dev-master via composer, so the github master I suppose.

Comments

 [2013-05-21 07:07 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fixed in github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/b63ca2ea9b448d26269ab3e8b 554cd7a9276d06f