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

Bug #14754 Comment at end of function throws off control sequence
Submitted: 2008-10-06 19:35 UTC
From: fidian Assigned: clbustos
Status: Closed Package: PHP_Beautifier (version 0.1.14)
PHP Version: 5.2.4 OS: Linux (various)
Roadmaps: 1.0.0RC1    
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 : 20 - 18 = ?

 
 [2008-10-06 19:35 UTC] fidian (Tyler Akins)
Description: ------------ If you add a comment at the end of a function inside a class, the closing brace thinks it is not the ending brace of the function. Test script: --------------- <?PHP class Z { public function a() { echo "hi"; } private function b() { echo "hi"; // Comment } private function c() { echo "hi"; } } ---------------------------------------- <?php class PHP_Beautifier_Filter_BBY extends PHP_Beautifier_Filter { function t_access($sTag) { $this->oBeaut->add($this->oBeaut->getTokenName($this->oBeaut->getControlSeq())); return PHP_Beautifier_Filter::BYPASS; } } Expected result: ---------------- <?PHP class Z { T_CLASSfunction a() { echo "hi"; } T_CLASSfunction b() { echo "hi"; // Comment } T_CLASSfunction c() { echo "hi"; } } Actual result: -------------- <?PHP class Z { T_CLASSfunction a() { echo "hi"; } T_CLASSfunction b() { echo "hi"; // Comment } T_FUNCTIONfunction c() { echo "hi"; } }

Comments

 [2010-03-16 10:54 UTC] clbustos (Claudio Bustos)
-Status: Open +Status: Closed -Assigned To: +Assigned To: clbustos -Roadmap Versions: +Roadmap Versions: 1.0.0RC1
This bug has been fixed in SVN. 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. Thanks for the patch!