PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_Beautifier » Bug #8362

curly-braces for control structures

Details

Submitted2006-08-04 14:21 UTC
Fromindeyets at gmail dot com
StatusBogus
PackagePHP_Beautifier
PHP Version5.1.4
Roadmaps(Not assigned)

Comments

[2006-08-04 14:21 UTC] indeyets at gmail dot com

Description:
------------
single-line if statements should be put into curly-braces by filter.

let me quote PEAR Coding standards:

You are strongly encouraged to always use curly braces even in situations where they are technically optional.

Test script:
---------------
if (true) echo "hello world";

Expected result:
----------------
if (true) {
echo "hello world";
}

Actual result:
--------------
if (true) echo "hello world";

[2006-10-05 07:24 UTC] clbustos at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

I prefer don't put any new token on the script. IMHO, this is a responsability of the developer.