aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/php/issue-4848.php
diff options
context:
space:
mode:
authorCaleb White <cdwhite3@pm.me>2024-03-16 19:50:13 -0500
committerGitHub <noreply@github.com>2024-03-16 20:50:13 -0400
commit143ca5ce17ae21233101246b5785b90d53aa8329 (patch)
tree3508a12c877818427060c9ae219bd1195454e465 /tests/indent/php/issue-4848.php
parentfeat(hyprlang): add bash injections (diff)
downloadnvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.gz
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.bz2
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.lz
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.xz
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.zst
nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.zip
feat(php): improve indents in return statements & chained methods
Diffstat (limited to 'tests/indent/php/issue-4848.php')
-rw-r--r--tests/indent/php/issue-4848.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/indent/php/issue-4848.php b/tests/indent/php/issue-4848.php
new file mode 100644
index 000000000..8d112ea14
--- /dev/null
+++ b/tests/indent/php/issue-4848.php
@@ -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 (
+ ) {
+ },
+ );