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 180936 - [Alignment] Indention for methods called via Method-Chaining
Summary: [Alignment] Indention for methods called via Method-Chaining
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 16:13 UTC by robo47
Modified: 2012-04-06 14:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description robo47 2010-02-18 16:13:58 UTC
The here mentioned alignment:
http://blogs.sun.com/netbeansphp/entry/formatting_tabs_and_indents#comment-1266500737000

would be nice if it would allow alignment for Method-Chaining too:

Two examples, one with a static-method-call and one with normal method-call and then chaining:

Input:
$data = Doctrine_Core::getTable('Table')
->createQuery()
->select()
->orderBy('name')
->execute()
->getData();

Expected output:

$data = Doctrine_Core::getTable('Table')
                     ->createQuery()
                     ->select()
                     ->orderBy('name')
                     ->execute()
                     ->getData();

Current Output:

$data = Doctrine_Core::getTable('Table')
    ->createQuery()
    ->select()
    ->orderBy('name')
    ->execute()
    ->getData();


#example 2

Input:

$table = Doctrine_Core::getTable('Table');
$data = $table->createQuery()
->select()
->orderBy('name')
->execute()
->getData();

Expected output:
$table = Doctrine_Core::getTable('Table');
$data = $table->createQuery()
              ->select()
              ->orderBy('name')
              ->execute()
              ->getData();


Current Output:

$table = Doctrine_Core::getTable('Table');
$data = $table->createQuery()
    ->select()
    ->orderBy('name')
    ->execute()
    ->getData();