Home » PHP » PHP_Beautifier » Bug #8362
curly-braces for control structures
Details
| Submitted | 2006-08-04 14:21 UTC |
|---|---|
| From | indeyets at gmail dot com |
| Status | Bogus |
| Package | PHP_Beautifier |
| PHP Version | 5.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.