emacs-php / emacs-php/php-mode
Indent callback functions
Open
- Dominant language
- Emacs Lisp
- Stars
- 602
- Forks
- 117
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 3
Description
Not sure if it's a bug, but this leads to inconsistent indentation.
These codes will be indented differently:
``` php
array_map(function() {
process();
}, [1, 2, 3])
```
``` php
array_map(function() use ($foo) {
process();
}, [1, 2, 3])
```
When an object function accepts a callback function, the indent is inconsistent as well.
``` php
$users->each(function($user) {
do_something();
});
```
``` php
$users->each(function($user) use ($foo) {
do_something();
});
```
Is there anything I can do to fix this? I'm using the default indent mode.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.