[Improvement] Remove tail comma for php function declarations
Hi,
This improvement aims to handle trailing comma with functions and methods in PHP. Since PHP 7.3 trailing comma in function calls is a valid syntax. But until PHP 8 tailing comma in function declarations will still be invalid.
Argwrap already allows us to add the trailing comma with either argwrap_trailing_comma = 1 or argwrap_trailing_comma_braces = '('options.
This PR adds a new option argwrap_php_remove_tail_comma_function_declaration, disabled by default, which activates a new hook that will remove the trailing comma only for function or method declarations.
The hook also handle arrow functions that were introduced in PHP 7.4.
Hi,
I completely forgot about that ! Anyway it could be merged ?