Home » PHP » PHP_Beautifier » Bug #8327
Layout of for loop
Details
| Request #8327 | Layout of for loop |
|---|---|
| Submitted | 2006-07-31 10:24 UTC |
| From | h dot stamerjohanns at iu-bremen dot de |
| Assigned | clbustos |
| Status | Closed |
| Package | PHP_Beautifier |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-07-31 10:24 UTC] h dot stamerjohanns at iu-bremen dot de
Description:
------------
The filter "Pear" creates this for a simple for loop:
<?php
for ($i = 0 ; $i <= 10 ; $i++) {}
?>
There is one extra space before semicolon.
Test script:
---------------
Suggested patch:
--- Pear.filter.php 2006-07-31 12:06:31.000000000 +0200
+++ myPear.filter.php 2006-07-31 12:16:30.000000000 +0200
@@ -73,7 +73,7 @@
$this->oBeaut->addNewLineIndent();
} elseif ($this->oBeaut->getControlParenthesis() == T_FOR) {
$this->oBeaut->removeWhitespace();
- $this->oBeaut->add(" ".$sTag." ");
+ $this->oBeaut->add($sTag." ");
} else {
return PHP_Beautifier_Filter::BYPASS;
[2007-02-10 04:41 UTC] clbustos at php dot net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/PHP_Beautifier