Hello, is there any way to change the setter method generator template? I don't want methods returning a self reference, I only want :void methods.
Setter without self reference
Tomas good point!
There is no setting yet, but I'm adding it to our to-do list.
Great, I can't wait. :)
- Edited
the next update/pre-release introduces settings "php.completion.getterSnippet"
and "php.completion.setterSnippet"
so you can play around :)
JakubMisek added the Solved tag.
Tomas preparing pre-release, you'll just add the following setting:
"php.completion.setterSnippet": "{PROPERTY} = ${NAME};",
Personally, I have setters like the following:
"php.completion.setterSnippet": "{PROPERTY} = ${NAME} ?? throw new InvalidArgumentException();",
or
"php.completion.setterSnippet": "{PROPERTY} = ${NAME};\nreturn {THIS};",