diff options
-rw-r--r-- | t/t4018/php-abstract-method | 7 | ||||
-rw-r--r-- | t/t4018/php-final-method | 7 | ||||
-rw-r--r-- | userdiff.c | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/t/t4018/php-abstract-method b/t/t4018/php-abstract-method new file mode 100644 index 0000000000..ce215df75a --- /dev/null +++ b/t/t4018/php-abstract-method @@ -0,0 +1,7 @@ +abstract class Klass +{ + abstract public function RIGHT(): ?string + { + return 'ChangeMe'; + } +} diff --git a/t/t4018/php-final-method b/t/t4018/php-final-method new file mode 100644 index 0000000000..537fb8ad9a --- /dev/null +++ b/t/t4018/php-final-method @@ -0,0 +1,7 @@ +class Klass +{ + final public function RIGHT(): string + { + return 'ChangeMe'; + } +} diff --git a/userdiff.c b/userdiff.c index fde02f225b..4e2b55a5e0 100644 --- a/userdiff.c +++ b/userdiff.c @@ -147,7 +147,7 @@ PATTERNS("perl", "|=~|!~" "|<<|<>|<=>|>>"), PATTERNS("php", - "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n" + "^[\t ]*(((public|protected|private|static|abstract|final)[\t ]+)*function.*)$\n" "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*" |