You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/01/17 07:39:07 UTC
[GitHub] [netbeans] tmysik commented on a change in pull request #2674: [NETBEANS-4443] PHP 8.0 Support: Constructor Property Promotion
tmysik commented on a change in pull request #2674:
URL: https://github.com/apache/netbeans/pull/2674#discussion_r559091798
##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/verification/WrongOrderOfArgsHint.java
##########
@@ -150,12 +150,18 @@ public String getDescription() {
@Override
public void implement() throws Exception {
EditList edits = new EditList(doc);
- OffsetRange offsetRange = getOffsetRange();
- StringBuilder sb = new StringBuilder();
- for (ParameterElement param : functionDeclarationInfo.getParameters()) {
- sb.append(param.asString(OutputType.COMPLETE_DECLARATION)).append(", "); //NOI18N
+ List<FormalParameter> originalParameters = node.getFormalParameters();
+ List<ParameterElement> parameters = functionDeclarationInfo.getParameters();
+ assert originalParameters.size() == parameters.size();
Review comment:
Nitpick: maybe better as:
```
assert originalParameters.size() == parameters.size() : originalParameters.size() + " != " + parameters.size();
```
Or similarly, of course.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists