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

Bug #13846 Bug in Squiz.NonExecutableCodeSniff
Submitted: 2008-05-07 09:30 UTC
From: dortheluebbert Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.1.0a1)
PHP Version: 5.2.5 OS: Linux
Roadmaps: 1.1.0    
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 : 40 + 32 = ?

 [2008-05-07 09:30 UTC] dortheluebbert (Dorthe Luebbert)
Description: ------------ The NonExecutableCodeSniff is not working as I expected. The sniff reports a warning after a continue (see test script below). Test script: --------------- class foo { public function aaa() { $fp = fopen("x.txt", "r"); while ($line=fgets($fp,2*1024*1024)) { if (!preg_match("/^<([a-z0-9_]+)/",$line,$matches)) continue; print $line; } } } Expected result: ---------------- PHPCS should not report a warning.


 [2008-05-08 01:16 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. 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. Was just a problem with the inline IF, which it did not support.