Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (43 sloc) 0.942 kb
<?php
/**
* Github Issue: https://github.com/ejmr/php-mode/issues/19
*
* If we run indent-region on the code below then it should appear
* like this with the '->' operators aligned:
*
* $object = new SomeClass();
* $object->method()
* ->another();
*
* Alignment should occur on the '->' characters regardless of the
* scope in which the method calls appear.
*/
$object = new StdClass();
$object->call()
->something();
class Whatever
{
public function __construct()
{
$object = new StdClass();
$object->call()
->something();
}
public function something()
{
$object = new StdClass();
$object->call()
->something();
}
}
$closure = function() {
$object = new StdClass();
$object->call()
->something();
};
function something()
{
$object = new StdClass();
$object->call()
->something();
}
Jump to Line
Something went wrong with that request. Please try again.