diff options
| -rw-r--r-- | queries/php/indents.scm | 1 | ||||
| -rw-r--r-- | tests/indent/php/enum-indent.php | 4 | ||||
| -rw-r--r-- | tests/indent/php_spec.lua | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/queries/php/indents.scm b/queries/php/indents.scm index aea769adf..5e2d51ce1 100644 --- a/queries/php/indents.scm +++ b/queries/php/indents.scm @@ -6,6 +6,7 @@ (return_statement) (arguments) (formal_parameters) + (enum_declaration_list) "[" ] @indent diff --git a/tests/indent/php/enum-indent.php b/tests/indent/php/enum-indent.php new file mode 100644 index 000000000..6d8093baf --- /dev/null +++ b/tests/indent/php/enum-indent.php @@ -0,0 +1,4 @@ +<?php + +enum Test: int +{ diff --git a/tests/indent/php_spec.lua b/tests/indent/php_spec.lua index d0b08aa6c..a826d0aa6 100644 --- a/tests/indent/php_spec.lua +++ b/tests/indent/php_spec.lua @@ -23,5 +23,6 @@ describe("indent PHP:", function() run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 }) run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 }) run:new_line("issue-3591.php", { on_line = 4, text = "$a =", indent = 8 }) + run:new_line("enum-indent.php", { on_line = 4, text = "case", indent = 4 }) end) end) |
