tmysik commented on code in PR #6951:
URL: https://github.com/apache/netbeans/pull/6951#discussion_r1451523893
##########
php/php.editor/src/org/netbeans/modules/php/editor/PredefinedSymbols.java:
##########
@@ -107,13 +107,57 @@ public final class PredefinedSymbols {
"__unserialize", // NOI18N PHP 7.4
})));
+ public static final Set<String> ATTRIBUTE_NAMES =
Collections.unmodifiableSet(Attributes.ATTRIBUTE_NAMES);
+ public static final Set<String> ATTRIBUTE_FQ_NAMES =
Collections.unmodifiableSet(Attributes.ATTRIBUTE_FQ_NAMES);
+
public static enum VariableKind {
STANDARD,
THIS,
SELF,
PARENT
};
+ // https://www.php.net/manual/en/reserved.attributes.php
+ public static enum Attributes {
+ ATTRIBUTE("Attribute"), // NOI18N
+ ALLOW_DYNAMIC_PROPERTIES("AllowDynamicProperties"), // NOI18N
+ OVERRIDE("Override"), // NOI18N
+ RETURN_TYPE_WILL_CHANGE("ReturnTypeWillChange"), // NOI18N
+ SENSITIVE_PARAMETER("SensitiveParameter"), // NOI18N
+ ;
+
+ private final String name;
+ private final String fqName;
+ private final String asAttributeExpression;
+ private static final Set<String> ATTRIBUTE_NAMES = new HashSet<>();
+ private static final Set<String> ATTRIBUTE_FQ_NAMES = new HashSet<>();
+
+ static {
+ for (Attributes attribute : Attributes.values()) {
+ ATTRIBUTE_NAMES.add(attribute.getName());
+ ATTRIBUTE_FQ_NAMES.add(attribute.getFqName());
Review Comment:
It is the same because it uses HashSet (which is backed by HashMap). But
forget it, it is totally fine :)
--
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