This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 171782 - Formating else if makes code unreadable
Summary: Formating else if makes code unreadable
Status: RESOLVED DUPLICATE of bug 164381
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 08:08 UTC by nbphpuser
Modified: 2009-09-14 10:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbphpuser 2009-09-09 08:08:01 UTC
if( isset($HTTP_POST_VARS['order']) ) {
    $sort_order = $HTTP_POST_VARS['order'];
}
else if( isset($HTTP_GET_VARS['order']) ) {
    $sort_order = $HTTP_GET_VARS['order'];
}
else {
    $sort_order = '';
}


formating this piece of code results in


if( isset($HTTP_POST_VARS['order']) ) {
    $sort_order = $HTTP_POST_VARS['order'];
}
else if( isset($HTTP_GET_VARS['order']) ) {
        $sort_order = $HTTP_GET_VARS['order'];
    }
    else {
        $sort_order = '';
    }


After else if indentation is placed wrong. Makes source code unreadable
Comment 1 Tomasz Slota 2009-09-14 10:07:14 UTC

*** This issue has been marked as a duplicate of 164381 ***