Skip to content

Commit

Permalink
Merge pull request apache#4308 from KacerCZ/php-expression-array-acce…
Browse files Browse the repository at this point in the history
…ss-fix

Fixes unhandled ExpressionArrayAccess in PHP Editor
  • Loading branch information
junichi11 authored Jul 4, 2022
2 parents 2cbef01 + 85d5c0c commit 6bf270e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.netbeans.modules.php.editor.parser.astnodes.ClassInstanceCreation;
import org.netbeans.modules.php.editor.parser.astnodes.ClassName;
import org.netbeans.modules.php.editor.parser.astnodes.Expression;
import org.netbeans.modules.php.editor.parser.astnodes.ExpressionArrayAccess;
import org.netbeans.modules.php.editor.parser.astnodes.FieldAccess;
import org.netbeans.modules.php.editor.parser.astnodes.FormalParameter;
import org.netbeans.modules.php.editor.parser.astnodes.FunctionDeclaration;
Expand Down Expand Up @@ -288,6 +289,8 @@ public static String extractQualifiedName(Expression typeName) {
} else if (typeName instanceof NullableType) {
NullableType nullableType = (NullableType) typeName;
return NULLABLE_TYPE_PREFIX + extractQualifiedName(nullableType.getType());
} else if (typeName instanceof ExpressionArrayAccess) {
return extractQualifiedName(((ExpressionArrayAccess) typeName).getExpression());
} else if (typeName instanceof UnionType) {
UnionType unionType = (UnionType) typeName;
StringBuilder sb = new StringBuilder();
Expand Down

0 comments on commit 6bf270e

Please sign in to comment.