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

Bug #17742 EmbeddedPhpSniff reacts negatively to file without closing php tag
Submitted: 2010-08-19 02:17 UTC
From: torkil Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.0a1)
PHP Version: 5.2.12 OS: OS X
Roadmaps: (Not assigned)    
Subscription  


 [2010-08-19 02:17 UTC] torkil (Torkil Johnsen)
Description: ------------ Squiz_Sniffs_PHP_EmbeddedPhpSniff says that "Inline PHP statement must end with a semicolon" for the opening <?php tag of a file that contains a class and has no ending php tag (?>). When the file does not contain one single inline embedded php block, then this sniff should never even run. Solution: The process method needs to check if a closing tag actually exists. Test script: --------------- <?php class Squiz_Sniffs_PHP_EmbeddedPhpSniff implements PHP_CodeSniffer_Sniff { } Expected result: ---------------- No errors Actual result: -------------- Error: Inline PHP statement must end with a semicolon

Comments

 [2010-08-20 03:38 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 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.