PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » PHP_Beautifier » Bug #7313

missing spaces around concat operator

Details

Request #7313missing spaces around concat operator
Submitted2006-04-05 12:13 UTC
Frompear at sebastianmendel dot de
StatusBogus
PackagePHP_Beautifier
PHP Version5.1.2
OSWindows
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...