nette / php-generator

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.

Home Page:https://doc.nette.org/php-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for trailling comma for method paramerts

astronom opened this issue · comments

Since the last update trailing comma supports for constructor property promotion. Also support for arrays. But there is no support for method and function parameters.

See https://github.com/nette/php-generator/blob/master/src/PhpGenerator/Printer.php#L322 Var special is determined dynamically

Suggest to add some parameter to Printer and support trailing comma whether needed.

Oh, that's a bug in the code, it was supposed to print trailing comma every time.

I instal the version with fix and it is working!
But in dev-master now is trailing whitespace in comment...
When are youg going to release?

I tried to fix it, can you test it?

I suppose this will fix trailing whitespace in multiline comments #107