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

Summary: [Alignment] Indention for methods called via Method-Chaining
Product: php Reporter: robo47 <robo47>
Component: Formatting & IndentationAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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();