summaryrefslogtreecommitdiff
path: root/t/t4018
diff options
context:
space:
mode:
authorKana Natsuno <dev@whileimautomaton.net>2018-07-03 13:15:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-06 21:59:28 (GMT)
commit1ab631647e3addd247c5482e8a3d4c9df7978c62 (patch)
tree1bbc145b8273ce532ce87863c235fdce1162cf47 /t/t4018
parent9992fbd7a1fdcc8fbaf0973a18d0eca94e1b7638 (diff)
downloadgit-1ab631647e3addd247c5482e8a3d4c9df7978c62.zip
git-1ab631647e3addd247c5482e8a3d4c9df7978c62.tar.gz
git-1ab631647e3addd247c5482e8a3d4c9df7978c62.tar.bz2
userdiff: support new keywords in PHP hunk header
Recent version of PHP supports interface, trait, abstract class and final class. This patch fixes the PHP hunk header regexp to support all of these keywords. Signed-off-by: Kana Natsuno <dev@whileimautomaton.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018')
-rw-r--r--t/t4018/php-abstract-class4
-rw-r--r--t/t4018/php-final-class4
-rw-r--r--t/t4018/php-interface4
-rw-r--r--t/t4018/php-trait7
4 files changed, 19 insertions, 0 deletions
diff --git a/t/t4018/php-abstract-class b/t/t4018/php-abstract-class
new file mode 100644
index 0000000..5213e12
--- /dev/null
+++ b/t/t4018/php-abstract-class
@@ -0,0 +1,4 @@
+abstract class RIGHT
+{
+ const FOO = 'ChangeMe';
+}
diff --git a/t/t4018/php-final-class b/t/t4018/php-final-class
new file mode 100644
index 0000000..69f5710
--- /dev/null
+++ b/t/t4018/php-final-class
@@ -0,0 +1,4 @@
+final class RIGHT
+{
+ const FOO = 'ChangeMe';
+}
diff --git a/t/t4018/php-interface b/t/t4018/php-interface
new file mode 100644
index 0000000..86b49ad
--- /dev/null
+++ b/t/t4018/php-interface
@@ -0,0 +1,4 @@
+interface RIGHT
+{
+ public function foo($ChangeMe);
+}
diff --git a/t/t4018/php-trait b/t/t4018/php-trait
new file mode 100644
index 0000000..65b8c82
--- /dev/null
+++ b/t/t4018/php-trait
@@ -0,0 +1,7 @@
+trait RIGHT
+{
+ public function foo($ChangeMe)
+ {
+ return 'foo';
+ }
+}