summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/t4018/php-enum4
-rw-r--r--userdiff.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/t/t4018/php-enum b/t/t4018/php-enum
new file mode 100644
index 0000000000..91a69c1a2b
--- /dev/null
+++ b/t/t4018/php-enum
@@ -0,0 +1,4 @@
+enum RIGHT: string
+{
+ case Foo = 'ChangeMe';
+}
diff --git a/userdiff.c b/userdiff.c
index b073e5563b..af02b1878c 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -228,7 +228,7 @@ PATTERNS("perl",
"|<<|<>|<=>|>>"),
PATTERNS("php",
"^[\t ]*(((public|protected|private|static|abstract|final)[\t ]+)*function.*)$\n"
- "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$",
+ "^[\t ]*((((final|abstract)[\t ]+)?class|enum|interface|trait).*)$",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"