aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/php/issue-4848.php
diff options
context:
space:
mode:
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 (
+ ) {
+ },
+ );