mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 22:40:12 -04:00
feat(php): improve indents in return statements & chained methods
This commit is contained in:
parent
df3e6a24ac
commit
143ca5ce17
3 changed files with 126 additions and 0 deletions
66
tests/indent/php/issue-4848.php
Normal file
66
tests/indent/php/issue-4848.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
if (
|
||||
) {
|
||||
}
|
||||
|
||||
return (
|
||||
);
|
||||
|
||||
return true
|
||||
;
|
||||
|
||||
return fn () => (
|
||||
);
|
||||
|
||||
return fn (
|
||||
) => (
|
||||
);
|
||||
|
||||
return function (
|
||||
) {
|
||||
};
|
||||
|
||||
return function () {
|
||||
};
|
||||
|
||||
return match (
|
||||
) {
|
||||
};
|
||||
|
||||
return match () {
|
||||
};
|
||||
|
||||
return new class
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
}
|
||||
|
||||
public function down(
|
||||
) {
|
||||
}
|
||||
};
|
||||
|
||||
$this->foo()
|
||||
->bar(
|
||||
)
|
||||
->baz();
|
||||
|
||||
$this->get()
|
||||
->each(function () {
|
||||
})
|
||||
->each(
|
||||
function (
|
||||
) {
|
||||
},
|
||||
);
|
||||
|
||||
return $this->get()
|
||||
->each(function () {
|
||||
})
|
||||
->each(
|
||||
function (
|
||||
) {
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue