From ec8776ed9ef56ffe7a61e67b64d5d6b6aba2c631 Mon Sep 17 00:00:00 2001 From: Caleb White Date: Sun, 18 Aug 2024 05:30:04 -0500 Subject: feat(php): php 8.4 support (#6741) * chore(php): update maintainers * feat(php): update php rules, highlight imported functions/consts * feat(php): indent inside property hooks * chore: update php and php_only revision --- tests/indent/php/property-hooks.php | 13 +++++++++++++ tests/indent/php_spec.lua | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 tests/indent/php/property-hooks.php (limited to 'tests/indent') diff --git a/tests/indent/php/property-hooks.php b/tests/indent/php/property-hooks.php new file mode 100644 index 000000000..e4aea4fdd --- /dev/null +++ b/tests/indent/php/property-hooks.php @@ -0,0 +1,13 @@ + $this->_baz; + set { + $this->_baz = strtoupper($value); + } + } +} diff --git a/tests/indent/php_spec.lua b/tests/indent/php_spec.lua index 2a41079ff..c3f84e6e2 100644 --- a/tests/indent/php_spec.lua +++ b/tests/indent/php_spec.lua @@ -67,5 +67,10 @@ describe("indent PHP:", function() run:new_line("issue-6888.php", { on_line = 6, text = "$a;", indent = 0 }) run:new_line("issue-6888.php", { on_line = 8, text = "$a;", indent = 4 }) run:new_line("issue-6888.php", { on_line = 11, text = "$a;", indent = 0 }) + run:new_line("property-hooks.php", { on_line = 7, text = "get;", indent = 8 }) + run:new_line("property-hooks.php", { on_line = 8, text = "set;", indent = 8 }) + run:new_line("property-hooks.php", { on_line = 9, text = "$a;", indent = 12 }) + run:new_line("property-hooks.php", { on_line = 11, text = "get;", indent = 8 }) + run:new_line("property-hooks.php", { on_line = 12, text = "get;", indent = 4 }) end) end) -- cgit v1.2.3-70-g09d2