diff options
author | Javier Spagnoletti <phansys@gmail.com> | 2020-10-07 06:38:18 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-07 18:45:43 +0300 |
commit | aff92827b54f4b7f9e339982a49bab4bdbd1fc55 (patch) | |
tree | 1a777dafd9e8822a4745b04547606569ef6226d8 /userdiff.c | |
parent | d98273ba77e1ab9ec755576bc86c716a97bf59d7 (diff) |
userdiff: PHP: catch "abstract" and "final" functions
PHP permits functions to be defined like
final public function foo() { }
abstract protected function bar() { }
but our hunk header pattern does not recognize these decorations.
Add "final" and "abstract" to the list of function modifiers.
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Javier Spagnoletti <phansys@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 2 |
1 files changed, 1 insertions, 1 deletions
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_]*" |