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

Bug #16740 False positives for heredoc strings and unused parameter sniff
Submitted: 2009-10-25 22:32 UTC
From: sebastian Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0)
PHP Version: 5.3.0 OS: Irrelevant
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 34 - 15 = ?

 [2009-10-25 22:32 UTC] sebastian (Sebastian Bergmann)
Description: ------------ A function or method parameter that is only used in an heredoc string is reported as not being used. Test script: --------------- <?php function foo($bar) { print <<<BAZ ... $bar ... BAZ } Expected result: ---------------- No violation. Actual result: -------------- FILE: /home/sb/test.php -------------------------------------------------------------------------------- FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 2 | WARNING | The method parameter $bar is never used --------------------------------------------------------------------------------


 [2010-01-14 09:45 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.