DamImpr commented on code in PR #9431:
URL: https://github.com/apache/netbeans/pull/9431#discussion_r3410127483
##########
php/php.editor/src/org/netbeans/modules/php/editor/codegen/SinglePropertyMethodCreator.java:
##########
@@ -191,6 +191,9 @@ public String create(Property property) {
}
private String getReturnType() {
+ if (cgsInfo.isFluentSetter() &&
cgsInfo.getPhpVersion().hasStaticReturnType()) {
Review Comment:
Exactly! I don’t know where to find a link to the documentation right now,
but fluent setters always return an instance of the object itself. What’s more,
the ‘insert code’ feature already ensured that fluent setters returned `$this`;
all I added was the return type, which had previously been omitted in the case
of fluent setters.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists