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

Bug #13169 Undefined variables
Submitted: 2008-02-21 15:45 UTC
From: mapi Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: 5.2.5 OS: any
Roadmaps: 1.1.0    
Subscription  


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:
MUST BE VALID
Solve the problem : 1 + 34 = ?

 
 [2008-02-21 15:45 UTC] mapi (Manuel Pichler)
Description: ------------ PHPUnit 3.2.15 failed for the Squiz_Tests_Commenting_VariableCommentUnitTest test suite because there are two undefined variables in the class Squiz_Sniffs_Commenting_VariableCommentSniff. The attached patch fixes the test case but I am not sure if I have to initialize $newlineCount with 0 and the test case is wrong or if the initial value 1 is correct.

Comments

 [2008-02-21 23:16 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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. Strangely enough, I couldn't replicate the failing test on 3.2.15, but I did see the problem and have fixed it. To answer your question about $newlineCount, it needs to be 1 if the short comment is empty and 0 otherwise.