Home » PHP » PHP_Beautifier » Bug #7313
missing spaces around concat operator
Details
| Request #7313 | missing spaces around concat operator |
|---|---|
| Submitted | 2006-04-05 12:13 UTC |
| From | pear at sebastianmendel dot de |
| Status | Bogus |
| Package | PHP_Beautifier |
| PHP Version | 5.1.2 |
| OS | Windows |
| Roadmaps | (Not assigned) |
Comments
[2006-04-05 12:13 UTC] pear at sebastianmendel dot de
Description:
------------
missing spaces around concat operator
Expected result:
----------------
print '...
<td>' . date("d.m.Y", $result[$i]["time"]) . '</td>
<td>' . $result[$i]["partner"] . '</td>
...';
Actual result:
--------------
print '...
<td>'.date("d.m.Y", $result[$i]["time"]) .'</td>
<td>'.$result[$i]["partner"].'</td>
...';
[2006-05-31 09:12 UTC] nicolasembleton at yahoo dot fr
I've posted the same workaround in your other bug, but to be clear, i repost it here:
This is very easy to correct actually.
You just have to create a 'token name' in the array in "Beautifier.php" => "public function __construct()" => "$aTokensToChange = array(".
Append at the end of the array ( or whereever you want, it doesn't matter ) the pattern you want to match ( like '<', '>', ... or '=>' will probably work too ), and create a new constant corresponding to your pattern.
ex: '>' => 'T_GREATER_THAN',
Then go in your filter.php and add a new function named by the name of your new constant ( or one already existing ) but in lowercase ( maybe uppercase will work, i don't know actually ) .
ex: function t_greater_than( $sTag )
In this function you can do everything you want.
ex: $this->oBeaut->add( ' ' .$sTag .' ' ) for your problem.
If someone want ( even the maintainer of the code ), i can send you the correct function and their places, to avoid you to work twice ;) )
[2006-06-06 04:59 UTC] clbustos at php dot net
Thank you for taking the time to write to us, but this is not
a bug.
A matter of taste...