Fix php indent for short array declaration

This commit is contained in:
gbprod 2022-10-06 09:17:35 +02:00 committed by Stephan Seitz
parent 07e5fcbaad
commit 84e23bd979
3 changed files with 7 additions and 0 deletions

View file

@ -6,6 +6,7 @@
(return_statement) (return_statement)
(arguments) (arguments)
(formal_parameters) (formal_parameters)
"["
] @indent ] @indent
[ [

View file

@ -0,0 +1,5 @@
<?php
function test() {
$array = [
}

View file

@ -22,5 +22,6 @@ describe("indent PHP:", function()
) )
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 }) 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("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 })
run:new_line("issue-3591.php", { on_line = 4, text = "$a =", indent = 8 })
end) end)
end) end)