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 14:35 UTC Modified: 2010-03-16 06:54 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  


 [2008-10-06 14: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 06: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!