Re: Re: PHP_CodeSniffer 1.0.1 on a do while loop
| From: | Greg Sherwood | Date: | Mon, 17 Mar 2008 22:37:14 +0000 |
| Subject: | Re: Re: PHP_CodeSniffer 1.0.1 on a do while loop | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49448@lists.php.net to get a copy of this message | ||
The error message is wrong though. I'll take a look into it.
Greg
Laurent Laville wrote:
Sorry to disturb, I've found my error (stupid ;-)} while(1); } while (1);A blank is missing Laurent Laville a écrit :While I fix lot of errors and warnings on my HTML_Progress2 package, there is one of them I don't understand On Preview.php file revision 1.7 [1], I got a : 80 | ERROR | Expected "do {\n...} while (...);\n"; found "...);\n" What's wrong on this code : Here is the loop (chunk of code extracted from [1])do { $percent = $bar->getPercentComplete(); if ($percent == 1) { break; // the progress bar has reached 100% } $bar->sleep(); $bar->moveNext(); } while(1);I'll be please if someone can tell me an answer. Did I something wrong, or just a new PHPCS bug ? Laurent [1] http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/Progress2/Generator/Preview.php